Home » Mojarra-2.0.1 » javax » faces » component » [javadoc | source]
javax.faces.component
public class: UISelectOne [javadoc | source]
java.lang.Object
   javax.faces.component.UIComponent
      javax.faces.component.UIComponentBase
         javax.faces.component.UIOutput
            javax.faces.component.UIInput
               javax.faces.component.UISelectOne

All Implemented Interfaces:
    EditableValueHolder, ValueHolder, PartialStateHolder, ComponentSystemEventListener, SystemEventListenerHolder

Direct Known Subclasses:
    HtmlSelectOneListbox, HtmlSelectOneRadio, HtmlSelectOneMenu

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 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.

 
public static final  String INVALID_MESSAGE_ID   

The message identifier of the javax.faces.application.FacesMessage to be created if a value not matching the available options is specified. 

Fields inherited from javax.faces.component.UIInput:
COMPONENT_TYPE,  COMPONENT_FAMILY,  CONVERSION_MESSAGE_ID,  REQUIRED_MESSAGE_ID,  UPDATE_MESSAGE_ID,  VALIDATE_EMPTY_FIELDS_PARAM_NAME,  validators
Fields inherited from javax.faces.component.UIOutput:
COMPONENT_TYPE,  COMPONENT_FAMILY
Fields inherited from javax.faces.component.UIComponent:
CURRENT_COMPONENT,  CURRENT_COMPOSITE_COMPONENT,  BEANINFO_KEY,  FACETS_KEY,  VIEW_LOCATION_KEY,  COMPOSITE_COMPONENT_TYPE_KEY,  COMPOSITE_FACET_NAME,  attributesThatAreSet,  stateHelper,  compositeParent,  bindings,  initialState,  listenersByEventClass
Constructor:
 public UISelectOne() 
Method from javax.faces.component.UISelectOne Summary:
getFamily,   validateValue
Methods from javax.faces.component.UIInput:
addValidator,   addValueChangeListener,   clearInitialState,   compareValues,   decode,   getConvertedValue,   getConverterMessage,   getFamily,   getRequiredMessage,   getSubmittedValue,   getValidator,   getValidatorMessage,   getValidators,   getValueChangeListener,   getValueChangeListeners,   isEmpty,   isImmediate,   isLocalValueSet,   isRequired,   isValid,   markInitialState,   processDecodes,   processUpdates,   processValidators,   removeValidator,   removeValueChangeListener,   resetValue,   restoreState,   saveState,   setConverterMessage,   setImmediate,   setLocalValueSet,   setRequired,   setRequiredMessage,   setSubmittedValue,   setValid,   setValidator,   setValidatorMessage,   setValue,   setValueChangeListener,   updateModel,   validate,   validateValue
Methods from javax.faces.component.UIOutput:
clearInitialState,   getConverter,   getFamily,   getLocalValue,   getValue,   markInitialState,   restoreState,   saveState,   setConverter,   setValue
Methods from javax.faces.component.UIComponentBase:
addClientBehavior,   addFacesListener,   broadcast,   clearInitialState,   decode,   encodeBegin,   encodeChildren,   encodeEnd,   findComponent,   getAttributes,   getChildCount,   getChildren,   getClientBehaviors,   getClientId,   getDefaultEventName,   getDescriptorMap,   getEventNames,   getFacesContext,   getFacesListeners,   getFacet,   getFacetCount,   getFacets,   getFacetsAndChildren,   getId,   getParent,   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
Methods from javax.faces.component.UIComponent:
addFacesListener,   broadcast,   clearInitialState,   decode,   encodeAll,   encodeBegin,   encodeChildren,   encodeEnd,   findComponent,   getAttributes,   getChildCount,   getChildren,   getClientId,   getClientId,   getCompositeComponentParent,   getContainerClientId,   getCurrentComponent,   getCurrentCompositeComponent,   getFacesContext,   getFacesListeners,   getFacet,   getFacetCount,   getFacets,   getFacetsAndChildren,   getFamily,   getId,   getListenersForEventClass,   getNamingContainer,   getParent,   getRenderer,   getRendererType,   getRendersChildren,   getResourceBundleMap,   getStateHelper,   getStateHelper,   getValueBinding,   getValueExpression,   initialStateMarked,   invokeOnComponent,   isCompositeComponent,   isInView,   isRendered,   isVisitable,   markInitialState,   popComponentFromEL,   processDecodes,   processEvent,   processRestoreState,   processSaveState,   processUpdates,   processValidators,   pushComponentToEL,   queueEvent,   removeFacesListener,   setId,   setInView,   setParent,   setRendered,   setRendererType,   setValueBinding,   setValueExpression,   subscribeToEvent,   unsubscribeFromEvent,   visitTree
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.faces.component.UISelectOne Detail:
 public String getFamily() 
 protected  void validateValue(FacesContext context,
    Object value) 

    In addition to the standard validation behavior inherited from UIInput , ensure that any specified value is equal to one of the available options. Before comparing each option, coerce the option value type to the type of this component's value following the Expression Language coercion rules. If the specified value is not equal to any of the options, enqueue an error message and set the valid property to false.

    If #isRequired returns true, and the current value is equal to the value of an inner UISelectItem whose UISelectItem#isNoSelectionOption method returns true, enqueue an error message and set the valid property to false.