Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Have a look at this similar <a href="https://stackoverflow.com/questions/4429208/bind-objects-in-a-set-collection">stackoverflow question</a>: </p> <p>According to the answer the best way would be to set the collection as a list</p> <pre><code>&lt;form:input path="contacts[0].phoneNumber"/&gt; </code></pre> <p>or as a map:</p> <pre><code>&lt;form:input path="contacts['contactId'].phoneNumber"/&gt; </code></pre> <p>You can use a lazy list (<a href="http://static.springsource.org/spring/docs/2.0.x/api/org/springframework/util/AutoPopulatingList.html" rel="nofollow noreferrer">Spring Autopopulating List</a>, <a href="http://commons.apache.org/collections/api/org/apache/commons/collections/ListUtils.html#lazyList%28java.util.List,%20org.apache.commons.collections.Factory%29" rel="nofollow noreferrer">Apache Commons Lazy List</a>, <a href="http://guava-libraries.googlecode.com/svn/trunk/javadoc/com/google/common/collect/Lists.html#transform%28java.util.List,%20com.google.common.base.Function%29" rel="nofollow noreferrer">Guava lists</a>) or a lazy map (<a href="http://guava-libraries.googlecode.com/svn/trunk/javadoc/com/google/common/collect/MapMaker.html" rel="nofollow noreferrer">Guava's Map Maker</a>, <a href="http://commons.apache.org/collections/api-release/org/apache/commons/collections/MapUtils.html#lazyMap%28java.util.Map%2C%20org.apache.commons.collections.Transformer%29" rel="nofollow noreferrer">Apache Commons lazy map</a>) so you won't have to worry to create a new object when you need them in the list or map. Just when you do a get to a position which have not been initialized the list/map wll automatically create a new instance of the object.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload