Class Hierarchy All Classes All Fields and Methods
Class javax.faces.component.UISelectOne
java.lang.Object javax.faces.component.UIComponent javax.faces.component.UIComponentBase javax.faces.component.UIOutput javax.faces.component.UIInput javax.faces.component.UISelectOnepublic class UISelectOne
extends UIInput
UISelectOne is a UIComponent that represents the user's choice of zero or one items 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 "javax.faces.Menu". This value can be changed by calling the setRendererType() method.
Field Index Field Description COMPONENT_FAMILY The standard component family for this component. COMPONENT_TYPE The standard component type for this component. INVALID_MESSAGE_ID The message identifier of the FacesMessage to be created if a value not matching the available options is specified.
Constructor Index Constructor Description UISelectOne() Create a new UISelectOne instance with default property values.
Method Index Method Description String getFamily() void validate(FacesContext) In addition to the standard validation behavior inherited from UIInput, ensure that any specified value is equal to one of the available options.
Fields
COMPONENT_FAMILY
public static final java.lang.String COMPONENT_FAMILY
The standard component family for this component.
COMPONENT_TYPE
public static final java.lang.String COMPONENT_TYPE
The standard component type for this component.
INVALID_MESSAGE_ID
public static final java.lang.String INVALID_MESSAGE_ID
The message identifier of the FacesMessage to be created if a value not matching the available options is specified.
Constructors
UISelectOne
public UISelectOne()
Create a new UISelectOne instance with default property values.
Methods
getFamily
public String getFamily()
validate
public void validate(FacesContext context)
In addition to the standard validation behavior inherited from UIInput, ensure that any specified value is equal to one of the available options. If it is not, enqueue an error message and set the valid property to false.
- Parameters
- context - The FacesContext for the current request
- Throws
- NullPointerException if context is null
- Overrides
Class Hierarchy All Classes All Fields and Methods