org.richfaces.component
Class UIListShuttle
java.lang.Object
javax.faces.component.UIComponent
javax.faces.component.UIComponentBase
javax.faces.component.UIData
org.ajax4jsf.component.UIDataAdaptor
org.richfaces.component.UIOrderingBaseComponent
org.richfaces.component.UIListShuttle
- All Implemented Interfaces:
- javax.faces.component.EditableValueHolder, javax.faces.component.NamingContainer, javax.faces.component.StateHolder, javax.faces.component.ValueHolder, org.ajax4jsf.component.AjaxChildrenEncoder, org.ajax4jsf.component.AjaxDataEncoder
- Direct Known Subclasses:
- HtmlListShuttle
public abstract class UIListShuttle
- extends UIOrderingBaseComponent
JSF component class
Nested classes/interfaces inherited from class org.ajax4jsf.component.UIDataAdaptor |
org.ajax4jsf.component.UIDataAdaptor.ComponentVisitor, org.ajax4jsf.component.UIDataAdaptor.IndexedEvent |
Fields inherited from class org.ajax4jsf.component.UIDataAdaptor |
COMPONENT_STATE_ATTRIBUTE, decodeVisitor, EMPTY_MODEL, updateVisitor, validateVisitor |
Fields inherited from interface javax.faces.component.NamingContainer |
SEPARATOR_CHAR |
Methods inherited from class org.richfaces.component.UIOrderingBaseComponent |
addConversionErrorMessage, addValidator, columns, compareValues, createComponentState, createContainer, createDataModel, dataChildren, decode, executeValidate, fixedChildren, getActiveItem, getAsObject, getAsString, getLocalValue, getLocalValueFieldValue, getSubmittedValue, getValidator, getValidators, getValue, isEmpty, isLocalValueSet, isSuitableValue, isTranslatedRenderingState, isTranslatedState, processDecodes, processUpdates, processValidators, removeValidator, setActiveItem, setLocalValueSet, setSubmittedValue, setTranslatedRenderingState, setTranslatedState, setValidator, setValue, updateModel |
Methods inherited from class org.ajax4jsf.component.UIDataAdaptor |
addRequestKey, broadcast, broadcastLocal, captureOrigValue, captureOrigValue, clearRequestKeysSet, containsRequestKey, encodeAjaxChild, encodeBegin, getAjaxKeys, getAllAjaxKeys, getBaseClientId, getChildrenRenderer, getChildState, getClientId, getComponentState, getEncodedIds, getExtendedDataModel, getRowCount, getRowData, getRowIndex, getRowKey, getRowKeyVar, getStateVar, isRowAvailable, iterate, processUpdates, processValidators, queueEvent, removeRequestKey, resetComponent, restoreChildState, restoreOrigValue, restoreOrigValue, saveChildState, setAjaxKeys, setComponentState, setExtendedDataModel, setId, setParent, setRowIndex, setRowKey, setRowKey, setRowKeyVar, setStateVar, setupVariable, walk |
Methods inherited from class javax.faces.component.UIData |
getFamily, getFirst, getFooter, getHeader, getRows, getVar, setFirst, setFooter, setHeader, setRows, setValueBinding, setVar |
Methods inherited from class javax.faces.component.UIComponentBase |
addFacesListener, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processRestoreState, processSaveState, removeFacesListener, restoreAttachedState, saveAttachedState, setRendered, setRendererType, setTransient |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.faces.component.EditableValueHolder |
isImmediate, isRequired, isValid, setImmediate, setRequired, setValid, setValueChangeListener |
Methods inherited from interface javax.faces.component.ValueHolder |
getConverter, setConverter |
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
updateTargetSelectionCommand
protected final UIOrderingBaseComponent.UpdateModelCommand updateTargetSelectionCommand
updateSourceSelectionCommand
protected final UIOrderingBaseComponent.UpdateModelCommand updateSourceSelectionCommand
UIListShuttle
public UIListShuttle()
processDecodes
protected void processDecodes(javax.faces.context.FacesContext faces,
java.lang.Object argument)
- Overrides:
processDecodes
in class org.ajax4jsf.component.UIDataAdaptor
saveState
public java.lang.Object saveState(javax.faces.context.FacesContext context)
- Specified by:
saveState
in interface javax.faces.component.StateHolder
- Overrides:
saveState
in class UIOrderingBaseComponent
restoreState
public void restoreState(javax.faces.context.FacesContext context,
java.lang.Object object)
- Specified by:
restoreState
in interface javax.faces.component.StateHolder
- Overrides:
restoreState
in class UIOrderingBaseComponent
getSourceValue
public java.lang.Object getSourceValue()
setSourceValue
public void setSourceValue(java.lang.Object sourceValue)
getTargetValue
public java.lang.Object getTargetValue()
setTargetValue
public void setTargetValue(java.lang.Object targetValue)
setSubmittedStrings
public void setSubmittedStrings(java.util.Map map,
java.util.Set sourceSelection,
java.util.Set targetSelection,
java.lang.Object activeItem)
saveIterationSubmittedState
protected java.lang.Object saveIterationSubmittedState()
- Specified by:
saveIterationSubmittedState
in class UIOrderingBaseComponent
restoreIterationSubmittedState
protected void restoreIterationSubmittedState(java.lang.Object object)
- Specified by:
restoreIterationSubmittedState
in class UIOrderingBaseComponent
saveIterationState
protected java.lang.Object saveIterationState()
- Specified by:
saveIterationState
in class UIOrderingBaseComponent
restoreIterationState
protected void restoreIterationState(java.lang.Object object)
- Specified by:
restoreIterationState
in class UIOrderingBaseComponent
createDataModel
public org.ajax4jsf.model.ExtendedDataModel createDataModel()
- Specified by:
createDataModel
in class org.ajax4jsf.component.UIDataAdaptor
addValueChangeListener
public void addValueChangeListener(javax.faces.event.ValueChangeListener listener)
getValueChangeListener
public abstract javax.faces.el.MethodBinding getValueChangeListener()
getValueChangeListeners
public javax.faces.event.ValueChangeListener[] getValueChangeListeners()
removeValueChangeListener
public void removeValueChangeListener(javax.faces.event.ValueChangeListener listener)
updateModel
public void updateModel(javax.faces.context.FacesContext context)
Perform the following algorithm to update the model data
associated with this UIInput
, if any, as appropriate.
- If the
valid
property of this component is
false
, take no further action.
- If the
localValueSet
property of this component is
false
, take no further action.
- If no
ValueBinding
for value
exists,
take no further action.
- Call
setValue()
method of the ValueBinding
to update the value that the ValueBinding
points at.
- If the
setValue()
method returns successfully:
- Clear the local value of this
UIInput
.
- Set the
localValueSet
property of this
UIInput
to false.
- If the
setValue()
method call fails:
- Enqueue an error message by calling
addMessage()
on the specified FacesContext
instance.
- Set the
valid
property of this UIInput
to false
.
- Specified by:
updateModel
in class UIOrderingBaseComponent
- Parameters:
context
- FacesContext
for the request we are processing
- Throws:
java.lang.NullPointerException
- if context
is null
validate
public void validate(javax.faces.context.FacesContext context)
Perform the following algorithm to validate the local value of
this UIInput
.
- Retrieve the submitted value with
getSubmittedValue()
.
If this returns null, exit without further processing. (This
indicates that no value was submitted for this component.)
- Convert the submitted value into a "local value" of the
appropriate data type by calling
#getConvertedValue
.
- Validate the property by calling
#validateValue
.
- If the
valid
property of this component is still
true
, retrieve the previous value of the component
(with getValue()
), store the new local value using
setValue()
, and reset the submitted value to
null. If the local value is different from
the previous value of this component, fire a
ValueChangeEvent
to be broadcast to all interested
listeners.
Application components implementing UIInput
that wish to
perform validation with logic embedded in the component should perform
their own correctness checks, and then call the
super.validate()
method to perform the standard
processing described above.
- Specified by:
validate
in class UIOrderingBaseComponent
- Parameters:
context
- The FacesContext
for the current request
- Throws:
java.lang.NullPointerException
- if context
is null
resetDataModel
protected void resetDataModel()
- Overrides:
resetDataModel
in class org.ajax4jsf.component.UIDataAdaptor
getItemState
public UIOrderingBaseComponent.ItemState getItemState()
- Specified by:
getItemState
in class UIOrderingBaseComponent
isOrderControlsVisible
public abstract boolean isOrderControlsVisible()
- Specified by:
isOrderControlsVisible
in class UIOrderingBaseComponent
setOrderControlsVisible
public abstract void setOrderControlsVisible(boolean visible)
- Specified by:
setOrderControlsVisible
in class UIOrderingBaseComponent
isFastOrderControlsVisible
public abstract boolean isFastOrderControlsVisible()
- Specified by:
isFastOrderControlsVisible
in class UIOrderingBaseComponent
setFastOrderControlsVisible
public abstract void setFastOrderControlsVisible(boolean visible)
- Specified by:
setFastOrderControlsVisible
in class UIOrderingBaseComponent
isMoveControlsVisible
public abstract boolean isMoveControlsVisible()
setMoveControlsVisible
public abstract void setMoveControlsVisible(boolean visible)
isFastMoveControlsVisible
public abstract boolean isFastMoveControlsVisible()
setFastMoveControlsVisible
public abstract void setFastMoveControlsVisible(boolean visible)
getSourceSelection
public java.util.Collection getSourceSelection()
setSourceSelection
public void setSourceSelection(java.util.Collection collection)
getTargetSelection
public java.util.Collection getTargetSelection()
setTargetSelection
public void setTargetSelection(java.util.Collection collection)
getSourceCaptionLabel
public abstract java.lang.String getSourceCaptionLabel()
setSourceCaptionLabel
public abstract void setSourceCaptionLabel(java.lang.String label)
getTargetCaptionLabel
public abstract java.lang.String getTargetCaptionLabel()
setTargetCaptionLabel
public abstract void setTargetCaptionLabel(java.lang.String label)
Copyright © 2007. All Rights Reserved.