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 UIDataAdaptor

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

All Implemented Interfaces:
  java.util.EventListener, javax.faces.component.NamingContainer, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.component.UniqueIdVendor, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder, org.ajax4jsf.component.IterationStateHolder

Direct Known Subclasses:
  UISequence

    public abstract class UIDataAdaptor

extends javax.faces.component.UIComponentBase
implements javax.faces.component.NamingContainer, javax.faces.component.UniqueIdVendor, org.ajax4jsf.component.IterationStateHolder, javax.faces.event.ComponentSystemEventListener

Base class for iterable components, like dataTable, Tomahawk dataList, Facelets repeat, tree etc., with support for partial rendering on AJAX responces for one or more selected iterations.

Author:
  shura

Nested Class Summary
`protected class` | `UIDataAdaptor.ComponentVisitor` Base class for visit data model at phases decode, validation and update model

Field Summary
`static java.lang.String` | `COMPONENT_FAMILY` The standard component family for this component.
`static java.lang.String` | `COMPONENT_TYPE` The standard component type for this component.
`protected UIDataAdaptor.ComponentVisitor` | `decodeVisitor` Visitor for process decode on children components.
`protected UIDataAdaptor.ComponentVisitor` | `updateVisitor` Visitor for process update model phase.
`protected UIDataAdaptor.ComponentVisitor` | `validateVisitor` Visitor for process validation phase

Fields inherited from class javax.faces.component.UIComponent
`BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, VIEW_LOCATION_KEY`

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

Constructor Summary
`UIDataAdaptor()`

Method Summary
`void` | `broadcast(javax.faces.event.FacesEvent event)`
`protected boolean` | `broadcastLocal(javax.faces.event.FacesEvent event)` Process events targetted for concrete implementation.
`void` | `captureOrigValue(javax.faces.context.FacesContext faces)` Save current state of data variable.
`void` | `clearInitialState()`
`protected abstract org.ajax4jsf.model.DataComponentState` | `createComponentState()`
`protected abstract org.ajax4jsf.model.ExtendedDataModel<?>` | `createExtendedDataModel()`
`java.lang.String` | `createUniqueId(javax.faces.context.FacesContext context, java.lang.String seed)`
`protected java.util.Iterator<javax.faces.component.UIComponent>` | `dataChildren()`
`void` | `encodeAjaxChild(javax.faces.context.FacesContext context, java.lang.String path, java.util.Set<java.lang.String> ids, java.util.Set<java.lang.String> renderedAreas)`
`protected java.lang.String` | `extractKeySegment(javax.faces.context.FacesContext context, java.lang.String substring)`
`protected java.util.Iterator<javax.faces.component.UIComponent>` | `fixedChildren()`
`java.lang.String` | `getClientId(javax.faces.context.FacesContext facesContext)`
`org.ajax4jsf.model.DataComponentState` | `getComponentState()`
`protected org.ajax4jsf.model.ExtendedDataModel<?>` | `getExtendedDataModel()`
`java.lang.String` | `getFamily()`
`java.lang.Object` | `getIterationState()`
`protected org.ajax4jsf.model.DataComponentState` | `getLocalComponentState()`
`int` | `getRowCount()`
`java.lang.Object` | `getRowData()`
`java.lang.Object` | `getRowKey()`
`javax.faces.convert.Converter` | `getRowKeyConverter()`
`java.lang.String` | `getRowKeyVar()`
`java.lang.String` | `getStateVar()`
`java.lang.String` | `getVar()`
`protected java.util.Map<java.lang.String,java.lang.Object>` | `getVariablesMap(javax.faces.context.FacesContext facesContext)`
`boolean` | `invokeOnComponent(javax.faces.context.FacesContext context, java.lang.String clientId, javax.faces.component.ContextCallback callback)`
`boolean` | `isKeepSaved()` Boolean attribute that defines whether this iteration component will reset saved children's state before rendering.
`boolean` | `isRowAvailable()`
`protected void` | `iterate(javax.faces.context.FacesContext faces, UIDataAdaptor.ComponentVisitor visitor)` Perform iteration on all children components and all data rows with given visitor.
`protected boolean` | `keepSaved(javax.faces.context.FacesContext context)` Check for validation errors on children components.
`void` | `markInitialState()`
`protected void` | `preDecode(javax.faces.context.FacesContext context)`
`protected void` | `preEncodeBegin(javax.faces.context.FacesContext context)`
`protected void` | `preUpdate(javax.faces.context.FacesContext context)`
`protected void` | `preValidate(javax.faces.context.FacesContext context)`
`void` | `processDecodes(javax.faces.context.FacesContext faces)`
`void` | `processEvent(javax.faces.event.ComponentSystemEvent event)`
`void` | `processUpdates(javax.faces.context.FacesContext faces)`
`void` | `processValidators(javax.faces.context.FacesContext faces)`
`void` | `queueEvent(javax.faces.event.FacesEvent event)`
`protected void` | `resetChildState()`
`protected void` | `resetDataModel()`
`protected void` | `restoreChildState(javax.faces.context.FacesContext facesContext)`
`protected void` | `restoreChildState(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component)` Restore values of `EditableValueHolder` fields after change current row.
`void` | `restoreOrigValue(javax.faces.context.FacesContext faces)` Restore value of data variable after processing phase.
`void` | `restoreState(javax.faces.context.FacesContext context, java.lang.Object stateObject)`
`protected void` | `saveChildState(javax.faces.context.FacesContext facesContext)` Save values of `EditableValueHolder` fields before change current row.
`protected void` | `saveChildState(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component)`
`java.lang.Object` | `saveState(javax.faces.context.FacesContext context)`
`protected void` | `setExtendedDataModel(org.ajax4jsf.model.ExtendedDataModel<?> extendedDataModel)`
`void` | `setId(java.lang.String id)`
`void` | `setIterationState(java.lang.Object stateObject)`
`void` | `setKeepSaved(boolean keepSaved)`
`void` | `setRowKey(javax.faces.context.FacesContext facesContext, java.lang.Object rowKey)` Setup current row by key.
`void` | `setRowKey(java.lang.Object rowKey)`
`void` | `setRowKeyConverter(javax.faces.convert.Converter converter)`
`void` | `setRowKeyVar(java.lang.String rowKeyVar)`
`void` | `setStateVar(java.lang.String stateVar)`
`protected void` | `setupVariable(javax.faces.context.FacesContext faces, boolean rowSelected)` Setup EL variable for different iteration.
`void` | `setValueExpression(java.lang.String name, javax.el.ValueExpression binding)`
`void` | `setVar(java.lang.String var)`
`protected boolean` | `visitDataChildren(javax.faces.component.visit.VisitContext visitContext, javax.faces.component.visit.VisitCallback callback, boolean visitRows)`
`protected boolean` | `visitFixedChildren(javax.faces.component.visit.VisitContext visitContext, javax.faces.component.visit.VisitCallback callback)`
`boolean` | `visitTree(javax.faces.component.visit.VisitContext visitContext, javax.faces.component.visit.VisitCallback callback)`
`void` | `walk(javax.faces.context.FacesContext faces, org.ajax4jsf.model.DataVisitor visitor, java.lang.Object argument)` Walk ( visit ) this component on all data-aware children for each row.

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

Methods inherited from class javax.faces.component.UIComponent
`encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getListenersForEventClass, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, pushComponentToEL, setInView, subscribeToEvent, unsubscribeFromEvent`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### COMPONENT_FAMILY

    public static final java.lang.String COMPONENT_FAMILY

  The standard component family for this component.

  See Also:
    Constant Field Values

### COMPONENT_TYPE

    public static final java.lang.String COMPONENT_TYPE

  The standard component type for this component.

  See Also:
    Constant Field Values

### decodeVisitor

    protected UIDataAdaptor.ComponentVisitor decodeVisitor

  Visitor for process decode on children components.

### validateVisitor

    protected UIDataAdaptor.ComponentVisitor validateVisitor

  Visitor for process validation phase

### updateVisitor

    protected UIDataAdaptor.ComponentVisitor updateVisitor

  Visitor for process update model phase.

Constructor Detail

### UIDataAdaptor

    public UIDataAdaptor()

Method Detail

### getVariablesMap

    protected java.util.Map<java.lang.String,java.lang.Object> getVariablesMap(javax.faces.context.FacesContext facesContext)

### getFamily

    public java.lang.String getFamily()

  Specified by:
    `getFamily` in class `javax.faces.component.UIComponent`

### encodeAjaxChild

    public void encodeAjaxChild(javax.faces.context.FacesContext context,
                                java.lang.String path,
                                java.util.Set<java.lang.String> ids,
                                java.util.Set<java.lang.String> renderedAreas)
                         throws java.io.IOException

  Throws:
    `java.io.IOException`

### createUniqueId

    public java.lang.String createUniqueId(javax.faces.context.FacesContext context,
                                           java.lang.String seed)

  Specified by:
    `createUniqueId` in interface `javax.faces.component.UniqueIdVendor`

### getRowKey

    public java.lang.Object getRowKey()

  Returns:
    the rowKey

### setRowKey

    public void setRowKey(javax.faces.context.FacesContext facesContext,
                          java.lang.Object rowKey)

  Setup current row by key. Perform same functionality as `UIData.setRowIndex(int)`, but for key object - it may be not only row number in sequence data, but, for example - path to current node in tree.

  Parameters:
    `faces` - - current FacesContext
    `key` - new key value.

### saveChildState

    protected void saveChildState(javax.faces.context.FacesContext facesContext)

  Save values of `EditableValueHolder` fields before change current row.

  Parameters:
    `faces` -

### saveChildState

    protected void saveChildState(javax.faces.context.FacesContext facesContext,
                                  javax.faces.component.UIComponent component)

  Parameters:
    `facesContext` -
    `next` -
    `childState` -

### dataChildren

    protected java.util.Iterator<javax.faces.component.UIComponent> dataChildren()

### fixedChildren

    protected java.util.Iterator<javax.faces.component.UIComponent> fixedChildren()

### restoreChildState

    protected void restoreChildState(javax.faces.context.FacesContext facesContext)

  Parameters:
    `facesContext` -

### restoreChildState

    protected void restoreChildState(javax.faces.context.FacesContext facesContext,
                                     javax.faces.component.UIComponent component)

  Restore values of `EditableValueHolder` fields after change current row.

  Parameters:
    `facesContext` -
    `next` -
    `childState` -

### setRowKey

    public void setRowKey(java.lang.Object rowKey)

### queueEvent

    public void queueEvent(javax.faces.event.FacesEvent event)

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

### broadcast

    public void broadcast(javax.faces.event.FacesEvent event)
                   throws javax.faces.event.AbortProcessingException

  Overrides:
    `broadcast` in class `javax.faces.component.UIComponentBase`
  Throws:
    `javax.faces.event.AbortProcessingException`

### broadcastLocal

    protected boolean broadcastLocal(javax.faces.event.FacesEvent event)

  Process events targetted for concrete implementation. Hook method called from `broadcast(FacesEvent)`

  Parameters:
    `event` - - processed event.
  Returns:
    true if event processed, false if component must continue processing.

### getExtendedDataModel

    protected org.ajax4jsf.model.ExtendedDataModel<?> getExtendedDataModel()

  Returns:
    the extendedDataModel

### createExtendedDataModel

    protected abstract org.ajax4jsf.model.ExtendedDataModel<?> createExtendedDataModel()

  Returns:

### setExtendedDataModel

    protected void setExtendedDataModel(org.ajax4jsf.model.ExtendedDataModel<?> extendedDataModel)

  Parameters:
    `extendedDataModel` - the extendedDataModel to set

### getVar

    public java.lang.String getVar()

### setVar

    public void setVar(java.lang.String var)

### getRowKeyVar

    public java.lang.String getRowKeyVar()

### setRowKeyVar

    public void setRowKeyVar(java.lang.String rowKeyVar)

### getStateVar

    public java.lang.String getStateVar()

### setStateVar

    public void setStateVar(java.lang.String stateVar)

### getRowCount

    public int getRowCount()

### getRowData

    public java.lang.Object getRowData()

### isRowAvailable

    public boolean isRowAvailable()

### isKeepSaved

    public boolean isKeepSaved()

  Boolean attribute that defines whether this iteration component will reset saved children's state before rendering. By default state is reset if there are no faces messages with severity error or higher.

  Returns:

### setKeepSaved

    public void setKeepSaved(boolean keepSaved)

### setupVariable

    protected void setupVariable(javax.faces.context.FacesContext faces,
                                 boolean rowSelected)

  Setup EL variable for different iteration. Value of row data and component state will be put into request scope attributes with names given by "var" and "varState" bean properties.

  Changed: does not check for row availability now

  Parameters:
    `faces` - current faces context
    `localModel` -
    `rowSelected` -

### getComponentState

    public org.ajax4jsf.model.DataComponentState getComponentState()

  Returns:

### createComponentState

    protected abstract org.ajax4jsf.model.DataComponentState createComponentState()

### getRowKeyConverter

    public javax.faces.convert.Converter getRowKeyConverter()

### setRowKeyConverter

    public void setRowKeyConverter(javax.faces.convert.Converter converter)

### getClientId

    public java.lang.String getClientId(javax.faces.context.FacesContext facesContext)

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

### captureOrigValue

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

  Save current state of data variable.

  Parameters:
    `faces` - current faces context

### restoreOrigValue

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

  Restore value of data variable after processing phase.

  Parameters:
    `faces` - current faces context

### setValueExpression

    public void setValueExpression(java.lang.String name,
                                   javax.el.ValueExpression binding)

  Overrides:
    `setValueExpression` in class `javax.faces.component.UIComponent`

### keepSaved

    protected boolean keepSaved(javax.faces.context.FacesContext context)

  Check for validation errors on children components. If true, saved values must be keep on render phase

  Parameters:
    `context` -
  Returns:

### iterate

    protected void iterate(javax.faces.context.FacesContext faces,
                           UIDataAdaptor.ComponentVisitor visitor)

  Perform iteration on all children components and all data rows with given visitor.

  Parameters:
    `faces` -
    `visitor` -

### walk

    public void walk(javax.faces.context.FacesContext faces,
                     org.ajax4jsf.model.DataVisitor visitor,
                     java.lang.Object argument)

  Walk ( visit ) this component on all data-aware children for each row.

  Parameters:
    `faces` -
    `visitor` -

### processDecodes

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

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

### processValidators

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

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

### processUpdates

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

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

### setId

    public void setId(java.lang.String id)

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

### getIterationState

    public java.lang.Object getIterationState()

  Specified by:
    `getIterationState` in interface `org.ajax4jsf.component.IterationStateHolder`

### setIterationState

    public void setIterationState(java.lang.Object stateObject)

  Specified by:
    `setIterationState` in interface `org.ajax4jsf.component.IterationStateHolder`

### resetDataModel

    protected void resetDataModel()

### resetChildState

    protected void resetChildState()

### preDecode

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

### preValidate

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

### preUpdate

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

### preEncodeBegin

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

### markInitialState

    public void markInitialState()

  Specified by:
    `markInitialState` in interface `javax.faces.component.PartialStateHolder`
  Overrides:
    `markInitialState` in class `javax.faces.component.UIComponentBase`

### clearInitialState

    public void clearInitialState()

  Specified by:
    `clearInitialState` in interface `javax.faces.component.PartialStateHolder`
  Overrides:
    `clearInitialState` in class `javax.faces.component.UIComponentBase`

### saveState

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

  Specified by:
    `saveState` in interface `javax.faces.component.StateHolder`
  Overrides:
    `saveState` in class `javax.faces.component.UIComponentBase`

### restoreState

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

  Specified by:
    `restoreState` in interface `javax.faces.component.StateHolder`
  Overrides:
    `restoreState` in class `javax.faces.component.UIComponentBase`

### invokeOnComponent

    public boolean invokeOnComponent(javax.faces.context.FacesContext context,
                                     java.lang.String clientId,
                                     javax.faces.component.ContextCallback callback)
                              throws javax.faces.FacesException

  Overrides:
    `invokeOnComponent` in class `javax.faces.component.UIComponentBase`
  Throws:
    `javax.faces.FacesException`

### visitFixedChildren

    protected boolean visitFixedChildren(javax.faces.component.visit.VisitContext visitContext,
                                         javax.faces.component.visit.VisitCallback callback)

### visitDataChildren

    protected boolean visitDataChildren(javax.faces.component.visit.VisitContext visitContext,
                                        javax.faces.component.visit.VisitCallback callback,
                                        boolean visitRows)

### visitTree

    public boolean visitTree(javax.faces.component.visit.VisitContext visitContext,
                             javax.faces.component.visit.VisitCallback callback)

  Overrides:
    `visitTree` in class `javax.faces.component.UIComponent`

### extractKeySegment

    protected java.lang.String extractKeySegment(javax.faces.context.FacesContext context,
                                                 java.lang.String substring)

  Parameters:
    `context` -
    `substring` -
  Returns:

### processEvent

    public void processEvent(javax.faces.event.ComponentSystemEvent event)
                      throws javax.faces.event.AbortProcessingException

  Specified by:
    `processEvent` in interface `javax.faces.event.ComponentSystemEventListener`
  Overrides:
    `processEvent` in class `javax.faces.component.UIComponent`
  Throws:
    `javax.faces.event.AbortProcessingException`

### getLocalComponentState

    protected org.ajax4jsf.model.DataComponentState getLocalComponentState()

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 © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.