javax.faces.component
Class UISelectMany
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, StateHolder, ValueHolder
- Direct Known Subclasses:
- HtmlSelectManyCheckbox, HtmlSelectManyListbox, HtmlSelectManyMenu
public class UISelectMany
- extends UIInput
see Javadoc of JSF Specification
- Version:
- $Revision: 472555 $ $Date: 2006-11-08 18:30:58 +0100 (Mi, 08 Nov 2006) $
- Author:
- Manfred Geiler (latest modification by $Author: grantsmith $)
Methods inherited from class javax.faces.component.UIInput |
addValidator, addValueChangeListener, broadcast, decode, getSubmittedValue, getValidator, getValidators, getValueChangeListener, getValueChangeListeners, isImmediate, isLocalValueSet, isRequired, isValid, processDecodes, processUpdates, processValidators, removeValidator, removeValueChangeListener, restoreState, saveState, setImmediate, setLocalValueSet, setRequired, setSubmittedValue, setValid, setValidator, setValue, setValueChangeListener, updateModel |
Methods inherited from class javax.faces.component.UIComponentBase |
addFacesListener, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, isRendered, isTransient, processRestoreState, processSaveState, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INVALID_MESSAGE_ID
public static final java.lang.String INVALID_MESSAGE_ID
- See Also:
- Constant Field Values
COMPONENT_TYPE
public static final java.lang.String COMPONENT_TYPE
- See Also:
- Constant Field Values
COMPONENT_FAMILY
public static final java.lang.String COMPONENT_FAMILY
- See Also:
- Constant Field Values
UISelectMany
public UISelectMany()
getSelectedValues
public java.lang.Object[] getSelectedValues()
setSelectedValues
public void setSelectedValues(java.lang.Object[] selectedValues)
getValueBinding
public ValueBinding getValueBinding(java.lang.String name)
- Description copied from class:
UIComponentBase
- Get the named value-binding associated with this component.
Value-bindings are stored in a map associated with the component,
though there is commonly a property (setter/getter methods)
of the same name defined on the component itself which
evaluates the value-binding when called.
- Overrides:
getValueBinding
in class UIComponentBase
setValueBinding
public void setValueBinding(java.lang.String name,
ValueBinding binding)
- Description copied from class:
UIComponentBase
- Put the provided value-binding into a map of value-bindings
associated with this component.
- Overrides:
setValueBinding
in class UIComponentBase
compareValues
protected boolean compareValues(java.lang.Object previous,
java.lang.Object value)
- Overrides:
compareValues
in class UIInput
- Returns:
- true if Objects are different (!)
validateValue
protected void validateValue(FacesContext context,
java.lang.Object convertedValue)
- Overrides:
validateValue
in class UIInput
validate
public void validate(FacesContext context)
- First part is identical to super.validate except the empty condition.
Second part: iterate through UISelectItem and UISelectItems and check
current values against these items
- Overrides:
validate
in class UIInput
getConvertedValue
protected java.lang.Object getConvertedValue(FacesContext context,
java.lang.Object submittedValue)
- Description copied from class:
UIInput
- Convert the provided object to the desired value.
If there is a renderer for this component, then call the renderer's
getConvertedValue method. While this can of course be implemented in
any way the renderer desires, it typically performs exactly the same
processing that this method would have done anyway (ie that described
below for the no-renderer case).
Otherwise:
- If the submittedValue is not a String then just return the
submittedValue unconverted.
- If there is no "value" value-binding then just return the
submittedValue unconverted.
- Use introspection to determine the type of the target
property specified by the value-binding, and then use
Application.createConverter to find a converter that can
map from String to the required type. Apply the converter
to the submittedValue and return the result.
- Overrides:
getConvertedValue
in class UIInput
getFamily
public java.lang.String getFamily()
- Overrides:
getFamily
in class UIInput
Copyright © 2009. All Rights Reserved.