Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2-RC2
    • Fix Version/s: 2.3-M1
    • Component/s: Controllers
    • Labels:
      None

      Description

      It's currently not possible to bind to a collection of domain objects on a command object...

      class SomeCommand {
          List <User> users
      }
      

      It also appears not to be possible to bind to a collection of "primitive" types.

        Issue Links

          Activity

          Hide
          cdeszaq added a comment -

          Since this is binding-related, would it make sense to flag it for v2.3?

          Show
          cdeszaq added a comment - Since this is binding-related, would it make sense to flag it for v2.3?
          Hide
          Keith Zimmerman added a comment - - edited

          Personally, I think that this code is really a workaround to an existing issue

          [].withDefault { new Object() }
          

          You cannot use a constraint like "minSize: 1", even with this workaround.

          Hopefully the v2.3 fix will address this.

          Show
          Keith Zimmerman added a comment - - edited Personally, I think that this code is really a workaround to an existing issue [].withDefault { new Object () } You cannot use a constraint like "minSize: 1", even with this workaround. Hopefully the v2.3 fix will address this.
          Hide
          Jeff Scott Brown added a comment -

          Note that the attached sample application doesn't work because the request parameters are named "user" but the property in the command object is named "users". The bug really exists but even if the bug didn't exist, the test case would have failed. In any case, this should be working now in 2.3.

          Show
          Jeff Scott Brown added a comment - Note that the attached sample application doesn't work because the request parameters are named "user" but the property in the command object is named "users". The bug really exists but even if the bug didn't exist, the test case would have failed. In any case, this should be working now in 2.3.
          Hide
          Maxwell Chiareli added a comment -

          I am using grails 2.2.0 and still have this issue. passing parameters like resultados[0].property causes a Missing Property exception

          Show
          Maxwell Chiareli added a comment - I am using grails 2.2.0 and still have this issue. passing parameters like resultados [0] .property causes a Missing Property exception
          Hide
          Jeff Scott Brown added a comment -

          Maxwell,

          The issue was only recently fixed, after 2.2 was released. Grails 2.3 should not have the problem.

          Thanks for the feedback.

          Show
          Jeff Scott Brown added a comment - Maxwell, The issue was only recently fixed, after 2.2 was released. Grails 2.3 should not have the problem. Thanks for the feedback.

            People

            • Assignee:
              Jeff Scott Brown
              Reporter:
              Luke Daley
            • Votes:
              11 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Last Reviewed:

                Development