public class UISelectItem extends UIComponentBase
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
Modifier and Type | Field and Description |
---|---|
static String |
COMPONENT_FAMILY |
static String |
COMPONENT_TYPE |
Constructor and Description |
---|
UISelectItem() |
Modifier and Type | Method and Description |
---|---|
String |
getFamily() |
String |
getItemDescription()
For use in development tools.
|
String |
getItemLabel()
Get the string which will be presented to the user for this option.
|
Object |
getItemValue() |
Object |
getValue() |
boolean |
isItemDisabled()
Determine whether this item can be chosen by the user.
|
void |
restoreState(FacesContext context,
Object state)
Invoked in the "restore view" phase, this initialises this
object's members from the values saved previously into the
provided state object.
|
Object |
saveState(FacesContext context)
Invoked after the render phase has completed, this method
returns an object which can be passed to the restoreState
of some other instance of UIComponentBase to reset that
object's state to the same values as this object currently
has.
|
void |
setItemDescription(String itemDescription) |
void |
setItemDisabled(boolean itemDisabled)
When true, this item cannot be chosen by the user.
|
void |
setItemLabel(String itemLabel) |
void |
setItemValue(Object itemValue) |
void |
setValue(Object value) |
addFacesListener, broadcast, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
public static final String COMPONENT_TYPE
public static final String COMPONENT_FAMILY
public String getFamily()
getFamily
in class UIComponent
public void setItemDescription(String itemDescription)
public String getItemDescription()
Q: what use is an EL expression for this???
public void setItemDisabled(boolean itemDisabled)
public boolean isItemDisabled()
public void setItemLabel(String itemLabel)
public String getItemLabel()
public void setItemValue(Object itemValue)
public Object getItemValue()
public void setValue(Object value)
public Object getValue()
public Object saveState(FacesContext context)
UIComponentBase
saveState
in interface StateHolder
saveState
in class UIComponentBase
public void restoreState(FacesContext context, Object state)
UIComponentBase
restoreState
in interface StateHolder
restoreState
in class UIComponentBase
state
- is an object previously returned by
the saveState method of this class.Copyright © 2012 Apache Software Foundation. All Rights Reserved.