...
Then put KeyProperty_fooCollection=id in my MyAction-conversion.properties file. This would allow to the use of fooCollection(someIdValue) to get the Foo object with value someIdValue in the Set fooSetfooCollection. For example, fooSetfooCollection(22) would return the Foo object in the fooCollection collection whose id property value was 22.
...
Wiki Markup |
---|
Unlike Map and List element properties, if fooCollection(22) does not exist it will not be created. To do that, use the notation *fooCollection.makeNew\[index\]* where index is an integer 0, 1, and so on. Thus, parameter value pairs *fooCollection.makeNew\[0\]=Phil* and *fooSetfooCollection.makeNew\[1\]=John* would add two new Foo objects to fooCollection one with name property value Phil and the other with name property value Bar. Note, however, that in the case of a Set, the equals and hashCode methods should be defined such that they don't only include the id property. That will cause one element of the null id propertied Foos to be removed from the Set. |
...