Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.richfaces.component
Class UIOrderingBaseComponent

    java.lang.Object
      javax.faces.component.UIComponent
          javax.faces.component.UIComponentBase
              javax.faces.component.UIData
                  org.ajax4jsf.component.UIDataAdaptor
                      org.richfaces.component.UIOrderingBaseComponent

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:
  UIListShuttle, UIOrderingList

    public abstract class UIOrderingBaseComponent

extends org.ajax4jsf.component.UIDataAdaptor
implements javax.faces.component.EditableValueHolder

Since:
  3.2
Author:
  Nick Belaevski mailto:nbelaevski@exadel.com created 16.11.2007

Nested Class Summary
`protected static interface` | `UIOrderingBaseComponent.DataAdder`
`static interface` | `UIOrderingBaseComponent.ItemState`
`protected static interface` | `UIOrderingBaseComponent.UpdateModelCommand`

Nested classes/interfaces inherited from class org.ajax4jsf.component.UIDataAdaptor
`org.ajax4jsf.component.UIDataAdaptor.ComponentVisitor, org.ajax4jsf.component.UIDataAdaptor.IndexedEvent`

Field Summary
`static org.apache.commons.collections.Predicate` | `isColumn`

Fields inherited from class org.ajax4jsf.component.UIDataAdaptor
`COMPONENT_STATE_ATTRIBUTE, decodeVisitor, EMPTY_MODEL, updateVisitor, validateVisitor`

Fields inherited from class javax.faces.component.UIData
`COMPONENT_FAMILY, COMPONENT_TYPE`

Fields inherited from class javax.faces.component.UIComponent
`bindings`

Fields inherited from interface javax.faces.component.NamingContainer
`SEPARATOR_CHAR`

Constructor Summary
`UIOrderingBaseComponent()`

Method Summary
`protected void` | `addConversionErrorMessage(javax.faces.context.FacesContext context, javax.faces.convert.ConverterException ce, java.lang.Object value)`
`void` | `addValidator(javax.faces.validator.Validator validator)`
`java.util.Iterator` | `columns()`
`protected boolean` | `compareValues(java.lang.Object previous, java.lang.Object value)` Return `true` if the new value is different from the previous value.
`protected org.ajax4jsf.model.DataComponentState` | `createComponentState()`
`protected java.lang.Object` | `createContainer(java.util.ArrayList data, java.lang.Object object)`
`protected javax.faces.model.DataModel` | `createDataModel(java.lang.Object value)`
`protected java.util.Iterator` | `dataChildren()`
`void` | `decode(javax.faces.context.FacesContext context)`
`protected void` | `executeValidate(javax.faces.context.FacesContext context)` Executes validation logic.
`protected java.util.Iterator` | `fixedChildren()`
`javax.faces.convert.Converter` | `getConverterForValue(javax.faces.context.FacesContext context)`
`abstract UIOrderingBaseComponent.ItemState` | `getItemState()`
`javax.faces.el.MethodBinding` | `getValidator()`
`javax.faces.validator.Validator[]` | `getValidators()`
`protected boolean` | `isEmpty(java.lang.Object value)`
`abstract boolean` | `isFastOrderControlsVisible()`
`boolean` | `isLocalValueSet()`
`abstract boolean` | `isOrderControlsVisible()`
`protected boolean` | `isSuitableValue(java.lang.Object value, java.lang.Object restoredObject)`
`void` | `processDecodes(javax.faces.context.FacesContext context)` Specialized decode behavior on top of that provided by the superclass.
`protected void` | `processingValidators(javax.faces.context.FacesContext context, java.lang.Object newValue, boolean isEmpty)`
`void` | `processUpdates(javax.faces.context.FacesContext context)` In addition to the standard `processUpdates` behavior inherited from `UIComponentBase`, calls `updateModel()`.
`void` | `processValidators(javax.faces.context.FacesContext context)` In addition to the standard `processValidators` behavior inherited from `UIComponentBase`, calls `validate()` if the `immediate` property is false (which is the default); if the component is invalid afterwards, calls `FacesContext.renderResponse()`.
`void` | `removeValidator(javax.faces.validator.Validator validator)`
`protected void` | `requiredValidation(javax.faces.context.FacesContext context, java.lang.Object newValue, boolean isRequired, boolean isEmpty)`
`void` | `restoreState(javax.faces.context.FacesContext faces, java.lang.Object object)`
`java.lang.Object` | `saveState(javax.faces.context.FacesContext faces)`
`abstract void` | `setFastOrderControlsVisible(boolean visible)`
`void` | `setLocalValueSet(boolean localValueSet)`
`abstract void` | `setOrderControlsVisible(boolean visible)`
`void` | `setValidator(javax.faces.el.MethodBinding validatorBinding)`
`abstract void` | `updateModel(javax.faces.context.FacesContext context)`
`protected void` | `updateModel(javax.faces.context.FacesContext context, UIOrderingBaseComponent.UpdateModelCommand command)`
`abstract void` | `validate(javax.faces.context.FacesContext context)`
`protected void` | `validateListValue(javax.faces.context.FacesContext context, java.lang.Object newValue, boolean isEmpty, boolean isRequired)`
`protected void` | `validateValue(javax.faces.context.FacesContext context, java.lang.Object newValue)` Set the "valid" property according to the below algorithm.

Methods inherited from class org.ajax4jsf.component.UIDataAdaptor
`addRequestKey, beforeRenderResponse, broadcast, broadcastLocal, captureOrigValue, captureOrigValue, clearRequestKeysSet, containsRequestKey, createDataModel, encodeAjaxChild, encodeBegin, extractKeySegment, getAjaxKeys, getAllAjaxKeys, getBaseClientId, getChildrenRenderer, getChildState, getClientId, getComponentState, getEncodedIds, getExtendedDataModel, getRowCount, getRowData, getRowIndex, getRowKey, getRowKeyConverter, getRowKeyVar, getStateVar, getValue, invocableChildren, invokeOnComponent, isRowAvailable, iterate, processDecodes, processUpdates, processValidators, queueEvent, removeRequestKey, resetComponent, resetDataModel, restoreChildState, restoreOrigValue, restoreOrigValue, saveChildState, setAjaxKeys, setComponentState, setExtendedDataModel, setId, setParent, setRowIndex, setRowKey, setRowKey, setRowKeyConverter, setRowKeyVar, setStateVar, setupVariable, setValue, walk`

Methods inherited from class javax.faces.component.UIData
`getDataModel, getFamily, getFirst, getFooter, getHeader, getRows, getVar, setDataModel, setFirst, setFooter, setHeader, setRows, setValueBinding, setValueExpression, setVar`

Methods inherited from class javax.faces.component.UIComponentBase
`addFacesListener, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processRestoreState, processSaveState, removeFacesListener, restoreAttachedState, saveAttachedState, setRendered, setRendererType, setTransient`

Methods inherited from class javax.faces.component.UIComponent
`encodeAll, getContainerClientId, getValueExpression`

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
`addValueChangeListener, getSubmittedValue, getValueChangeListener, getValueChangeListeners, isImmediate, isRequired, isValid, removeValueChangeListener, setImmediate, setRequired, setSubmittedValue, setValid, setValueChangeListener`

Methods inherited from interface javax.faces.component.ValueHolder
`getConverter, getLocalValue, getValue, setConverter, setValue`

Field Detail

### isColumn

    public static final org.apache.commons.collections.Predicate isColumn

Constructor Detail

### UIOrderingBaseComponent

    public UIOrderingBaseComponent()

Method Detail

### isSuitableValue

    protected boolean isSuitableValue(java.lang.Object value,
                                      java.lang.Object restoredObject)

### isOrderControlsVisible

    public abstract boolean isOrderControlsVisible()

### setOrderControlsVisible

    public abstract void setOrderControlsVisible(boolean visible)

### isFastOrderControlsVisible

    public abstract boolean isFastOrderControlsVisible()

### setFastOrderControlsVisible

    public abstract void setFastOrderControlsVisible(boolean visible)

### saveState

    public java.lang.Object saveState(javax.faces.context.FacesContext faces)

  Specified by:
    `saveState` in interface `javax.faces.component.StateHolder`
  Overrides:
    `saveState` in class `org.ajax4jsf.component.UIDataAdaptor`

### restoreState

    public void restoreState(javax.faces.context.FacesContext faces,
                             java.lang.Object object)

  Specified by:
    `restoreState` in interface `javax.faces.component.StateHolder`
  Overrides:
    `restoreState` in class `org.ajax4jsf.component.UIDataAdaptor`

### createComponentState

    protected org.ajax4jsf.model.DataComponentState createComponentState()

  Specified by:
    `createComponentState` in class `org.ajax4jsf.component.UIDataAdaptor`

### columns

    public java.util.Iterator columns()

### dataChildren

    protected java.util.Iterator dataChildren()

  Specified by:
    `dataChildren` in class `org.ajax4jsf.component.UIDataAdaptor`

### fixedChildren

    protected java.util.Iterator fixedChildren()

  Specified by:
    `fixedChildren` in class `org.ajax4jsf.component.UIDataAdaptor`

### getValidator

    public javax.faces.el.MethodBinding getValidator()

  Specified by:
    `getValidator` in interface `javax.faces.component.EditableValueHolder`

### setValidator

    public void setValidator(javax.faces.el.MethodBinding validatorBinding)

  Specified by:
    `setValidator` in interface `javax.faces.component.EditableValueHolder`

### getValidators

    public javax.faces.validator.Validator[] getValidators()

  Specified by:
    `getValidators` in interface `javax.faces.component.EditableValueHolder`

### addValidator

    public void addValidator(javax.faces.validator.Validator validator)

  Specified by:
    `addValidator` in interface `javax.faces.component.EditableValueHolder`

### removeValidator

    public void removeValidator(javax.faces.validator.Validator validator)

  Specified by:
    `removeValidator` in interface `javax.faces.component.EditableValueHolder`

### isLocalValueSet

    public boolean isLocalValueSet()

  Specified by:
    `isLocalValueSet` in interface `javax.faces.component.EditableValueHolder`

### setLocalValueSet

    public void setLocalValueSet(boolean localValueSet)

  Specified by:
    `setLocalValueSet` in interface `javax.faces.component.EditableValueHolder`

### createDataModel

    protected javax.faces.model.DataModel createDataModel(java.lang.Object value)

### decode

    public void decode(javax.faces.context.FacesContext context)

  Overrides:
    `decode` in class `javax.faces.component.UIComponentBase`

### processDecodes

    public void processDecodes(javax.faces.context.FacesContext context)

  Specialized decode behavior on top of that provided by the superclass. In addition to the standard `processDecodes` behavior inherited from `UIComponentBase`, calls `validate()` if the the `immediate` property is true; if the component is invalid afterwards or a `RuntimeException` is thrown, calls `FacesContext.renderResponse()`.

  Overrides:
    `processDecodes` in class `org.ajax4jsf.component.UIDataAdaptor`

### executeValidate

    protected void executeValidate(javax.faces.context.FacesContext context)

  Executes validation logic.

### validate

    public abstract void validate(javax.faces.context.FacesContext context)

### processValidators

    public void processValidators(javax.faces.context.FacesContext context)

  In addition to the standard `processValidators` behavior inherited from `UIComponentBase`, calls `validate()` if the `immediate` property is false (which is the default); if the component is invalid afterwards, calls `FacesContext.renderResponse()`. If a `RuntimeException` is thrown during validation processing, calls `FacesContext.renderResponse()` and re-throw the exception.

  Overrides:
    `processValidators` in class `org.ajax4jsf.component.UIDataAdaptor`

### validateValue

    protected void validateValue(javax.faces.context.FacesContext context,
                                 java.lang.Object newValue)

  Set the "valid" property according to the below algorithm.

  - If the `valid` property on this component is still `true`, and the `required` property is also true, ensure that the local value is not empty (where "empty" is defined as `null` or a zero-length String. If the local value is empty:
    - Enqueue an appropriate error message by calling the `addMessage()` method on the `FacesContext` instance for the current request.
    - Set the `valid` property on this component to `false`.
  - If the `valid` property on this component is still `true`, and the local value is not empty, call the `validate()` method of each `Validator` registered for this `UIInput`, followed by the method pointed at by the `validatorBinding` property (if any). If any of these validators or the method throws a `ValidatorException`, catch the exception, add its message (if any) to the `FacesContext`, and set the `valid` property of this component to false.

### validateListValue

    protected void validateListValue(javax.faces.context.FacesContext context,
                                     java.lang.Object newValue,
                                     boolean isEmpty,
                                     boolean isRequired)

### requiredValidation

    protected void requiredValidation(javax.faces.context.FacesContext context,
                                      java.lang.Object newValue,
                                      boolean isRequired,
                                      boolean isEmpty)

### processingValidators

    protected void processingValidators(javax.faces.context.FacesContext context,
                                        java.lang.Object newValue,
                                        boolean isEmpty)

### processUpdates

    public void processUpdates(javax.faces.context.FacesContext context)

  In addition to the standard `processUpdates` behavior inherited from `UIComponentBase`, calls `updateModel()`. If the component is invalid afterwards, calls `FacesContext.renderResponse()`. If a `RuntimeException` is thrown during update processing, calls `FacesContext.renderResponse()` and re-throw the exception.

  Overrides:
    `processUpdates` in class `org.ajax4jsf.component.UIDataAdaptor`

### updateModel

    public abstract void updateModel(javax.faces.context.FacesContext context)

### updateModel

    protected void updateModel(javax.faces.context.FacesContext context,
                               UIOrderingBaseComponent.UpdateModelCommand command)

### compareValues

    protected boolean compareValues(java.lang.Object previous,
                                    java.lang.Object value)

  Return `true` if the new value is different from the previous value.

  Parameters:
    `previous` - old value of this component (if any)
    `value` - new value of this component (if any)

### addConversionErrorMessage

    protected void addConversionErrorMessage(javax.faces.context.FacesContext context,
                                             javax.faces.convert.ConverterException ce,
                                             java.lang.Object value)

### isEmpty

    protected boolean isEmpty(java.lang.Object value)

### createContainer

    protected java.lang.Object createContainer(java.util.ArrayList data,
                                               java.lang.Object object)

### getItemState

    public abstract UIOrderingBaseComponent.ItemState getItemState()

### getConverterForValue

    public javax.faces.convert.Converter getConverterForValue(javax.faces.context.FacesContext context)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008. All Rights Reserved.