Skip to content

Commit

Permalink
Remove outdated wording about data binding to collections
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Scott Brown committed Feb 4, 2014
1 parent ce40b93 commit 8e3a5e0
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/en/guide/theWebLayer/controllers/dataBinding.gdoc
Original file line number Diff line number Diff line change
Expand Up @@ -301,15 +301,7 @@ Note also that if the association you are binding to has a size of two and you r
<g:textField name="books[2].title" value="Red Madder" />
{code}

Then Grails will automatically create a new instance for you at the defined position. If you "skipped" a few elements in the middle:

{code:xml}
<g:textField name="books[0].title" value="the Stand" />
<g:textField name="books[1].title" value="the Shining" />
<g:textField name="books[5].title" value="Red Madder" />
{code}

Then Grails will automatically create instances in between. For example in the above case Grails will create 4 additional instances if the association being bound had a size of 2.
Then Grails will automatically create a new instance for you at the defined position.

You can bind existing instances of the associated type to a @List@ using the same @.id@ syntax as you would use with a single-ended association. For example:

Expand Down

0 comments on commit 8e3a5e0

Please sign in to comment.