public class UISelectItem extends UIComponentBase
UISelectItem is a
component that may be nested inside a UISelectMany
or UISelectOne
component, and
causes the addition of a SelectItem
instance to the list of available options for the
parent component. The contents of the SelectItem
can be specified in one of the following
ways:
value
attribute's value is an instance of SelectItem
.ValueExpression
points at a model data item of type
SelectItem
.SelectItem
instance is synthesized from the values of the
itemDescription
, itemDisabled
, itemLabel
, itemEscaped
, and itemValue
attributes.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COMPONENT_FAMILY
The standard component family for this component.
|
static java.lang.String |
COMPONENT_TYPE
The standard component type for this component.
|
ATTRS_WITH_DECLARED_DEFAULT_VALUES, BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, HONOR_CURRENT_COMPONENT_ATTRIBUTES_PARAM_NAME, VIEW_LOCATION_KEY
Constructor and Description |
---|
UISelectItem()
Create a new
UISelectItem instance with default property values. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getFamily()
Return the identifier of the component family to which this component belongs. |
java.lang.String |
getItemDescription()
Return the description for this selection item.
|
java.lang.String |
getItemLabel()
Return the localized label for this selection item.
|
java.lang.Object |
getItemValue()
Return the server value for this selection item.
|
java.lang.Object |
getValue()
Returns the
value property of the UISelectItem . |
boolean |
isItemDisabled()
Return the disabled setting for this selection item.
|
boolean |
isItemEscaped()
Return the escape setting for the label of this selection item.
|
boolean |
isNoSelectionOption()
Return the value of the |
void |
setItemDescription(java.lang.String itemDescription)
Set the description for this selection item.
|
void |
setItemDisabled(boolean itemDisabled)
Set the disabled value for this selection item.
|
void |
setItemEscaped(boolean itemEscaped)
Set the escape value for the label of this selection item.
|
void |
setItemLabel(java.lang.String itemLabel)
Set the localized label for this selection item.
|
void |
setItemValue(java.lang.Object itemValue)
Set the server value for this selection item.
|
void |
setNoSelectionOption(boolean noSelectionOption)
Set the value of the |
void |
setValue(java.lang.Object value)
Sets the
value property of the UISelectItem . |
addClientBehavior, addFacesListener, broadcast, clearInitialState, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getPassThroughAttributes, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, markInitialState, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, restoreState, saveAttachedState, saveState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, subscribeToEvent, unsubscribeFromEvent
encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getPassThroughAttributes, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView, setValueExpression, visitTree
public static final java.lang.String COMPONENT_TYPE
The standard component type for this component.
public static final java.lang.String COMPONENT_FAMILY
The standard component family for this component.
public UISelectItem()
Create a new UISelectItem
instance with default property values.
public java.lang.String getFamily()
UIComponent
Return the identifier of the component family to which this component belongs. This
identifier, in conjunction with the value of the rendererType
property, may be used to select the appropriate Renderer
for this component
instance. Note this method should NOT return null
getFamily
in class UIComponent
public java.lang.String getItemDescription()
Return the description for this selection item.
public void setItemDescription(java.lang.String itemDescription)
Set the description for this selection item.
itemDescription
- The new descriptionpublic boolean isItemDisabled()
Return the disabled setting for this selection item.
true
is the item disabled, false
otherwise.public void setItemDisabled(boolean itemDisabled)
Set the disabled value for this selection item.
itemDisabled
- The new disabled flagpublic boolean isItemEscaped()
Return the escape setting for the label of this selection item.
true
if the item is escaped, false
otherwise.public void setItemEscaped(boolean itemEscaped)
Set the escape value for the label of this selection item.
itemEscaped
- The new disabled flagpublic java.lang.String getItemLabel()
Return the localized label for this selection item.
public void setItemLabel(java.lang.String itemLabel)
Set the localized label for this selection item.
itemLabel
- The new localized labelpublic java.lang.Object getItemValue()
Return the server value for this selection item.
public void setItemValue(java.lang.Object itemValue)
Set the server value for this selection item.
itemValue
- The new server valuepublic java.lang.Object getValue()
Returns the value
property of the UISelectItem
.
public void setValue(java.lang.Object value)
Sets the value
property of the UISelectItem
.
value
- the new valuepublic boolean isNoSelectionOption()
Return the value of the noSelectionOption
property. If the value of this
property is true
, the system interprets the option represented by this
UISelectItem
instance as representing a "no selection" option. See
UISelectOne.validateValue(javax.faces.context.FacesContext, java.lang.Object)
and UISelectMany.validateValue(javax.faces.context.FacesContext, java.lang.Object)
for usage.
public void setNoSelectionOption(boolean noSelectionOption)
Set the value of the noSelectionOption
property.
noSelectionOption
- the no selection option.