collection:string

This is a usefull tag if you wan to convert a Collection eiter to or from a String. It can do both. This is decided by the method attribute.

If the operation is split you can choose the type of object to be returned. This is done by the type attribute.

Syntax
<collection:string
   delimiter="..."?
   id="..."?
   keyValueDelimiter="..."?
   method="..."?
   name="..."?
   property="..."?
   type="..."?
   value="..."?/>
Attributes
id

Name of the String or Collection that is returned from this tag. This is determined by the method attribute.

value

The object to convert. This must be of the correct type acording to current method.

name

The key value to look up an existing bean. There is two ways of using this bean.

Either the bean must be of type collection or String. This depends on which type of operation you intend to do.

Or the bean must have a property to get the wanted object. Then the attribute property must be used.

Using this attribute excludes the use of the value attribute.

property

Identifies the JavaBeans property (of the bean identified by the name attribute) to get the Object to be used by the tag. If not specified, the bean identified by the name attribute itself will be used as the value.

method

This attribute will define the usage of this tag.

Valid values:

If set to split it will take a String, split it and then add all items into the Collection. If it is set to merge the tag will take the specified Collection and merge all itemes into a String.

type

Will define what type of Collection the tag will return. You can either specify the class or just type either collection or map.

If you specify a class is must be an instance of java.util.Collection or java.util.Map

This attribute is only in use when method is set to split.

delimiter

What delimiter to be used to separate to elements when converting a collection to a String.

If not specified the default value will be used. The default value is ,

keyValueDelimiter

This delimiter will only be used when converting a String to a Map. It is used to separate the key/value pair.

If not specified will the default value be used. The default value is =