Overview | Library | Tag | Help
| FRAMES NO FRAMES

## f
Tag selectItems

Add a child UISelectItems component to the UIComponent associated with the closed parent UIComponent custom action.

When iterating over the select items, `toString()` must be called on the string rendered attribute values.

Version 2 of the specification introduces several new attributes, described below. These are: var, itemValue, itemLabel, itemDescription, itemDisabled, and itemLabelEscaped.

Tag Information
Tag Class | com.sun.faces.taglib.jsf_core.SelectItemsTag
TagExtraInfo Class | None
Body Content | empty
Display Name | None

Attributes
Name | Required | Request-time | Type | Description
binding | false | false | `javax.el.ValueExpression` (must evaluate to `javax.faces.component.UIComponent`) | Value binding expression to a backing bean property bound to the component instance for the UIComponent created by this custom action.
id | false | true | `java.lang.String` | Component identifier of the UISelectItems component to be created.
value | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.Object`) | Value expression pointing at any `Collection` or array. The member elements may be instances of `SelectItem` or any Java Object. In the case where the member elements are plain Java Objects, several additional attributes must be used by the page author to correctly identify the data to the enclosing `UISelectOne` or `UISelectMany` component, as shown in the following example. <h:selectOneListbox size="1" id="escape02" value="#{select05NoSelection.initialCollectionValues}"> <f:selectItems value="#{select05NoSelection.hobbitList}" var="n" itemValue="#{n}" itemLabel="#{n.bio}" itemDescription="#{n.description}" itemDisabled="#{n.disabled}" itemLabelEscaped="true" noSelectionValue="#{select05NoSelection.hobbitList[0]}"/> </h:selectOneListbox> In the preceding example, the `value` attribute on line 1 points to a `Collection<HobbitBean>`. `HobbitBean` is just a regular Java Object (POJO) that conforms to JavaBeans naming conventions for its properties. The `value` attribute on line 2 points to a `List<HobbitBean>`, though it could just as well point to a `Collection`, array, or `javax.faces.model.DataModel`. The attributes on lines 3 through 9, inclusive, leverage the fact that the value is a collection of POJOs.
var | false | false | `java.lang.String` | Expose the value from the `value` attribute under this request scoped key so that it may be referred to in EL for the value of other attributes.
itemValue | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.Object`) | evaluates to a `Collection`, array, or `Map` from which the items to be shown will be rendered.
itemLabel | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | evaluates to a String that will serve as the label to be shown for the item.
itemDescription | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | evaluates to a String that will serve as the description to be shown for the item.
itemDisabled | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.Boolean`) | evaluates to a boolean that will determine if the item value is selectable or not.
itemLabelEscaped | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.Boolean`) | evaluates to a boolean that will determine if the rendered markup for the item receives normal JSF HTML escaping or not.
noSelectionValue | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.Boolean`) | Is either an EL expression pointing to the element in the value collection whose value should be marked as a “no selection” item, or a literal string that exactly matches the value of the item in the collection that must be marked as the “no selection” item. If the user selects such an item and the field is marked as required, then it will not pass validation.

Variables
| No Variables Defined.

Overview | Library | Tag | Help
| FRAMES NO FRAMES

Output Generated by Tag Library Documentation Generator.