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

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

Direct Known Subclasses:
    HtmlSelectManyCheckbox, HtmlSelectManyListbox, HtmlSelectManyMenu

UISelectMany is a UIComponent that represents the user's choice of a zero or more items from among a discrete set of available options. The user can modify the selected values. Optionally, the component can be preconfigured with zero or more currently selected items, by storing them as an array or Collection in the value property of the component.

This component is generally rendered as a select box or a group of checkboxes.

By default, the rendererType property must be set to "javax.faces.Listbox". This value can be changed by calling the setRendererType() method.

The javax.faces.render.Renderer for this component must perform the following logic on getConvertedValue():

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 UISelectMany() 
Method from javax.faces.component.UISelectMany Summary:
compareValues,   getFamily,   getSelectedValues,   getValueBinding,   getValueExpression,   setSelectedValues,   setValueBinding,   setValueExpression,   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.UISelectMany Detail:
 protected boolean compareValues(Object previous,
    Object value) 

    Return true if the new value is different from the previous value. Value comparison must not be sensitive to element order.

 public String getFamily() 
 public Object[] getSelectedValues() 

    Return the currently selected values, or null if there are no currently selected values. This is a typesafe alias for getValue().

 public ValueBinding getValueBinding(String name) 
Deprecated! this - has been replaced by #getValueExpression(java.lang.String) .

    Return any ValueBinding set for value if a ValueBinding for selectedValues is requested; otherwise, perform the default superclass processing for this method.

    This method relies on the superclass to provide the ValueExpression to ValueBinding wrapping.

 public ValueExpression getValueExpression(String name) 

    Return any ValueExpression set for value if a ValueExpression for selectedValues is requested; otherwise, perform the default superclass processing for this method.

 public  void setSelectedValues(Object[] selectedValues) 

    Set the currently selected values, or null to indicate that there are no currently selected values. This is a typesafe alias for setValue().

 public  void setValueBinding(String name,
    ValueBinding binding) 
Deprecated! This - has been replaced by #setValueExpression(java.lang.String, javax.el.ValueExpression) .

    Store any ValueBinding specified for selectedValues under value instead; otherwise, perform the default superclass processing for this method.

    This method relies on the superclass to wrap the argument ValueBinding in a ValueExpression.

 public  void setValueExpression(String name,
    ValueExpression binding) 

    Store any ValueExpression specified for selectedValues under value instead; otherwise, perform the default superclass processing for this method.

 protected  void validateValue(FacesContext context,
    Object value) 

    In addition to the standard validation behavior inherited from UIInput , ensure that any specified values are 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.

    This method must explicitly support a value argument that is a single value or a value argument that is a Collection or Array of values.

    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.