Project Documentation


Tag name: <t:selectItems>
UIComponent class: org.apache.myfaces.custom.selectitems.UISelectItems
Tag class: org.apache.myfaces.custom.selectitems.SelectItemsTag
Component type: org.apache.myfaces.UISelectItems
Component family: javax.faces.SelectItems

An extended version of the standard UISelectItems. Populates the SelectItem collection from the given value automatically using the itemLabel and itemValue attributes. By using the component there is no need to manually create a SelectItem collection because component automatically populates SelectItem objects from types like Collection, Map and etc..


<h:selectOneMenu id="menu1" value="#{selectItemsBean.selectedCarColor}">
    <t:selectItems value="#{selectItemsBean.carList}" var="Car" itemLabel="#{Car.type}" itemValue="#{Car.color}" />


This component can be used with any selection component. Also it's compatible with RI.


Name Type Supports EL? Description
binding org.apache.myfaces.custom.selectitems.UISelectItems Only EL Identifies a backing bean property (of type UIComponent or appropriate subclass) to bind " + "to this component instance. This value must be an EL expression.
id String Yes Get a string which uniquely identifies this UIComponent within the scope of the nearest ancestor NamingContainer component. The id is not necessarily unique across all components in the current view.
itemDescription Object Yes name of the selectitem
itemDisabled Object Yes disabled state of the selectitem
itemLabel Object Yes name of the selectitem
itemLabelEscaped Object Yes indicate if the label should be escaped of the selectitem
itemValue Object Yes value of the selectitem
useEntryAsItem boolean Yes Only applies when value points to a map. Use the Entry instance instead the value for resolve EL Expressions
value Object Yes The initial value of this component.
var String No name of the iterator