12. JSF Tag Reference
Contents > JSF Tag Reference > JSF Core Tags
10. JSF Core Tag Reference
Contents > JSF Core Tag Reference > f:selectItems
f:selectItems |
|
The SelectItems tag adds a child UISelectItems component to the component associated with enclosing tag. You can use this tag to set a list of objects in your domain model as the options for a select component. The body content of this tag must be empty.
Example:
<h:selectManyListbox id="list">
<f:selectItems value="#{optionBean.optionList}"></f:selectItem>
</h:selectManyListbox>
HTML Output
<select id="list" name="list" multiple="true" size="-2147483648">
<option value="1">Option 1</option>
<option value="2">Option 2</option>
<option value="3">Option 3</option>
</select>
|
Tag Attributes
| binding |
String |
| |
| The value-binding expression linking this component tag to a backing bean property. |
| id |
String |
| |
| The unique identifier value for this component. The value must be unique within the closest naming container. |
| value |
String |
| |
| The value attribute takes a value-binding expression pointing at a List or array of SelectItem instances containing the information for the options generated by this tag. |
|