Hi,
 
how can I use t:selectItems with a Map ?
 
E. g.:
 
<t:selectManyMenu value="#{mbean.systemsSelected}">
        <t:selectItems value="#{mbean.systemsAvailable}" var="cursystem"
itemValue="#{cursystem.key}" itemLabel="#{cursystem.value}" />
</t:selectManyMenu>


I don't know what I should do with attributes "var", "itemValue" and
"itemLabel" when using a map. Here is the part of the documentation:


An EL expression that specifies the contents of the selection list. The
expression can refer to one of the following:

   1. A single SelectItem
   2. An array or Collection of SelectItem instances
   3. A Map. The contents of the Map are used to create SelectItem
instances, where the SelectItem's label is the map's key value, and the
SelectItem's value is the map's value. When using a map, it is
recommended that an ordered implementation such as java.util.TreeMap is
used.

The value properties of each of the SelectItems must be of the same
basic type as the parent component's value.

Reply via email to