UI-Component Sets
Project Documentation


Tag name: <f:selectItem>
UIComponent class: javax.faces.component.UISelectItem
Tag class: org.apache.myfaces.taglib.core.SelectItemTag
Component type: javax.faces.SelectItem
Component family: javax.faces.SelectItem

A component representing a single option that the user can choose.

The option attributes can either be defined directly on this component (via the itemValue, itemLabel, itemDescription properties) or the value property can reference a SelectItem object (directly or via an EL expression).

The value expression (if defined) is read-only; the parent select component will have a value attribute specifying where the value for the chosen selection will be stored.

See Javadoc of JSF Specification


Name Type Supports EL? Description
binding String 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 An identifier for this particular component instance within a component view.

The id must be unique within the scope of the tag's enclosing NamingContainer (eg h:form or f:subview). The id is not necessarily unique across all components in the current view

This value must be a static value, ie not change over the lifetime of a component. It cannot be defined via an EL expression; only a string is permitted.

itemDescription String Yes An optional description for this item. For use in development tools.
itemDisabled boolean Yes Determine whether this item can be chosen by the user.
itemLabel String Yes Get the string which will be presented to the user for this option.
itemValue Object Yes The value of this item, of the same type as the parent component's value.
value Object Yes An EL expression that refers to a javax.faces.model.SelectItem instance.