javax.faces.component
public class: UISelectItems [javadoc |
source]
java.lang.Object
javax.faces.component.UIComponent
javax.faces.component.UIComponentBase
javax.faces.component.UISelectItems
All Implemented Interfaces:
StateHolder
UISelectItems is a component that may be nested
inside a UISelectMany or UISelectOne component, and
causes the addition of one or more SelectItem instances to the
list of available options in the parent component. The
value of this component (set either directly, or acquired
indirectly a javax.el.ValueExpression , can be of any
of the following types:
- Single instance of SelectItem - This instance is
added to the set of available options for the parent tag.
- Array of SelectItem - This set of instances is
added to the set of available options for the parent component,
in ascending subscript order.
- Collection of SelectItem - This set of instances is
added to the set of available options for the parent component,
in the order provided by an iterator over them.
- Map - The keys of this object (once converted to
Strings) are assumed to be labels, and the values of this object
(once converted to Strings)
are assumed to be values, of SelectItem instances that will
be constructed dynamically and added to the set of available options
for the parent component, in the order provided by an iterator over
the keys.
| Field Summary |
|---|
| public static final String | COMPONENT_TYPE | The standard component type for this component. |
| public static final String | COMPONENT_FAMILY | The standard component family for this component. |
| Methods from javax.faces.component.UIComponentBase: |
|---|
|
addFacesListener, broadcast, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getDescriptorMap, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, restoreState, saveAttachedState, saveState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding |
| Methods from javax.faces.component.UIComponent: |
|---|
|
addFacesListener, broadcast, decode, encodeAll, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getAttributesThatAreSet, getChildCount, getChildren, getClientId, getContainerClientId, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getFamily, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, getValueExpression, invokeOnComponent, isRendered, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, setId, setParent, setRendered, setRendererType, setValueBinding, setValueExpression |
| Method from javax.faces.component.UISelectItems Detail: |
public String getFamily() {
// -------------------------------------------------------------- Properties
return (COMPONENT_FAMILY);
}
|
public Object getValue() {
if (this.value != null) {
return (this.value);
}
ValueExpression ve = getValueExpression("value");
if (ve != null) {
try {
return (ve.getValue(getFacesContext().getELContext()));
}
catch (ELException e) {
throw new FacesException(e);
}
} else {
return (null);
}
}
|
public void restoreState(FacesContext context,
Object state) {
values = (Object[]) state;
super.restoreState(context, values[0]);
value = values[1];
}
|
public Object saveState(FacesContext context) {
if (values == null) {
values = new Object[2];
}
values[0] = super.saveState(context);
values[1] = value;
return (values);
}
|
public void setValue(Object value) {
this.value = value;
}
|