|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.faces.component.UIComponentBase
javax.faces.component.UIOutput
javax.faces.component.UIInput
javax.faces.component.UISelectBase
javax.faces.component.UISelectOne
UISelectOne is a UIComponent that represents
the user's choice of a single item from among a discrete set of
available options. The user can modify the selected value. Optionally,
the component can be preconfigured with a currently selected item, by
storing it as the value property of the component.
This component is generally rendered as a select box or a group of radio buttons.
By default, the rendererType property is set to
"Listbox". This value can be changed by calling the
setRendererType() method.
| Field Summary |
| Fields inherited from class javax.faces.component.UIInput |
listeners |
| Fields inherited from interface javax.faces.component.UIComponent |
SEPARATOR_CHAR |
| Constructor Summary | |
UISelectOne()
Create a new UISelectOne instance with default property
values. |
|
| Method Summary | |
void |
addComponentToNamespace(UIComponent namedComponent)
Add the specified UIComponent to the namespace of this
naming container. |
UIComponent |
findComponentInNamespace(java.lang.String name)
Find and return a UIComponent in this namespace, if it
is present; otherwise return null. |
java.lang.String |
generateClientId()
Generate an identifier for a component, suitable for communication to a client. |
java.lang.Object |
getSelectedValue()
Return the currently selected item, or null if there
is no currently selected item. |
protected java.util.Iterator |
getSelectItems(FacesContext context)
Return an Iterator over SelectItem instances representing the
available options for this component, assembled from the set of
UISelectItem and/or UISelectItems components that are
direct children of this component. |
void |
removeComponentFromNamespace(UIComponent namedComponent)
Remove the specified UIComponent from the namespace of
this naming container, if it is present. |
void |
setSelectedValue(java.lang.Object selectedItem)
Set the currently selected item, or null to indicate
that there is no currently selected item. |
| Methods inherited from class javax.faces.component.UIInput |
addValueChangedListener, broadcast, broadcast, compareValues, fireValueChangedEvent, getPrevious, removeValueChangedListener, setPrevious, updateModel, validate |
| Methods inherited from class javax.faces.component.UIOutput |
currentValue, getValue, getValueRef, setValue, setValueRef |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public UISelectOne()
Create a new UISelectOne instance with default property
values.
| Method Detail |
public java.lang.Object getSelectedValue()
Return the currently selected item, or null if there
is no currently selected item.
public void setSelectedValue(java.lang.Object selectedItem)
Set the currently selected item, or null to indicate
that there is no currently selected item.
selectedItem - The new selected item (if any)protected java.util.Iterator getSelectItems(FacesContext context)
Return an Iterator over SelectItem instances representing the
available options for this component, assembled from the set of
UISelectItem and/or UISelectItems components that are
direct children of this component. If there are no such children, a
zero-length array is returned.
context - The FacesContext for the current request
java.lang.IllegalArgumentException - if the value of a
UISelectItem or UISelectItems is of the wrong type
java.lang.NullPointerException - if context
is nullpublic void addComponentToNamespace(UIComponent namedComponent)
NamingContainerAdd the specified UIComponent to the namespace of this
naming container.
addComponentToNamespace in interface NamingContainernamedComponent - The UIComponent to be addedpublic void removeComponentFromNamespace(UIComponent namedComponent)
NamingContainerRemove the specified UIComponent from the namespace of
this naming container, if it is present.
removeComponentFromNamespace in interface NamingContainernamedComponent - The UIComponent to be removedpublic UIComponent findComponentInNamespace(java.lang.String name)
NamingContainerFind and return a UIComponent in this namespace, if it
is present; otherwise return null.
If the argument name does not contain any UIComponent.SEPARATOR_CHAR characters, it is interpreted to be a
name in the namespace of this naming container.
If the argument name does contain UIComponent.SEPARATOR_CHAR characters, each segment between
UIComponent.SEPARATOR_CHAR is treated as a component
identifier in its own namespace, which are searched for in
child naming containers of this naming container, from left
to right.
findComponentInNamespace in interface NamingContainername - Identifier of the desired componentpublic java.lang.String generateClientId()
NamingContainerGenerate an identifier for a component, suitable for communication to a client. The identifier returned from this method must be unique within this namespace.
generateClientId in interface NamingContainer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||