Documentation
JSFToolbox

Search 

Contents

  1. Introduction
  2. Getting Started
  3. Developing Web Sites
  4. Using Components
  5. Internationalization
  6. Code View Support
  7. Design View Support
  8. Keyboard Shortcuts
  9. Tag Object Toolbars
  10. JSF Server Behaviors
  11. Property Inspectors
Selected 12. JSF Tag Reference

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.