Description
This is an extended version of javax.faces.component.UISelectItems. 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..
API
since | 1.1.5 |
component-family | javax.faces.SelectItems |
renderer-type | - |
component-class | org.apache.myfaces.custom.selectitems.UISelectItems |
renderer-class | - |
tag-class | org.apache.myfaces.custom.selectitems.SelectItemsTag |
Usage
<h:selectOneMenu id="menu1" value="#{selectItemsBean.selectedCarColor}"> <t:selectItems value="#{selectItemsBean.carList}" var="Car" itemLabel="#{Car.type}" itemValue="#{Car.color}" /> </h:selectOneMenu>