collection:add

Adds a value to a Collection. When adding a value to a Map or List you must only use value/valueName/valueProperty. But you are adding to a Map you must use both value/valueName/valueProperty and key/keyName/keyProperty.

Syntax
<collection:add
   collection="..."
   key="..."?
   keyName="..."?
   keyProperty="..."?
   value="..."?
   valueName="..."?
   valueProperty="..."?/>
Attributes
collection, mandatory

The collection to add a object to. This can either be a List, Set or Map.

value

This will be the object to add to the specified Collection. It is not necessary to specify this attribute if valueName is used. They are mutual exclusively. If both are specified the value will be used.

valueName

Specifies the attribute name of the bean that we will use as value. If valueProperty also is provided we will get that property from the bean specified here. This attribute is required unless you specify a value attribute.

valueProperty

Will get the property from the bean specified by the valueName attribute. To use this attribute valueName must also must be defined.

key

This will be the object to add to the specified Collection. It is not necessary to specify this attribute if valueName is used. They are mutual exclusively. If both are specified the value will be used.

keyName

Specifies the attribute name of the bean that we will use as key. If keyProperty also is provided we will get that property from the bean specified here. This attribute is required unless you specify a key attribute.

keyProperty

Will get the property from the bean specified by the keyName attribute. To use this attribute keyName must also must be defined.