Class Hierarchy All Classes All Fields and Methods

 

Class javax.faces.component.UISelectMany

java.lang.Object
        javax.faces.component.UIComponent
                javax.faces.component.UIComponentBase
                        javax.faces.component.UIOutput
                                javax.faces.component.UIInput
                                        javax.faces.component.UISelectMany

public class UISelectMany
extends UIInput

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 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 Renderer for this component must perform the following logic on getConvertedValue():

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
UISelectMany() Create a new UISelectMany instance with default property values.

Method Index
Method Description
boolean compareValues(Object, Object) Return true if the new value is different from the previous value.
String getFamily()  
Object[] getSelectedValues() Return the currently selected values, or null if there are no currently selected values.
ValueBinding getValueBinding(String) Return any ValueBinding set for value if a ValueBinding for selectedValues is requested; otherwise, perform the default superclass processing for this method.
void setSelectedValues(Object[]) Set the currently selected values, or null to indicate that there are no currently selected values.
void setValueBinding(String, ValueBinding) Store any ValueBinding specified for selectedValues under value instead; otherwise, perform the default superclass processing for this method.
void validate(FacesContext) In addition to the standard validation behavior inherited from UIInput, ensure that any specified values are 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

 

UISelectMany

public UISelectMany() 

Create a new UISelectMany instance with default property values.

 

Methods

 

compareValues

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.

 

getFamily

public String getFamily() 

 

getSelectedValues

public Object[] getSelectedValues() 

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

 

getValueBinding

public ValueBinding getValueBinding(String name) 

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

 

setSelectedValues

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

 

setValueBinding

public void setValueBinding(String name,
                            ValueBinding binding) 

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

 

validate

public void validate(FacesContext context) 

In addition to the standard validation behavior inherited from UIInput, ensure that any specified values are equal to one of the available options. If it is not, enqueue an error message and set the valid property to false.

Class Hierarchy All Classes All Fields and Methods