org.richfaces.component

## Class AbstractTree

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

- All Implemented Interfaces:
    EventListener, javax.faces.component.NamingContainer, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.component.TransientStateHolder, javax.faces.component.UniqueIdVendor, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListener, javax.faces.event.SystemEventListenerHolder, TreeSelectionChangeSource, TreeToggleSource, org.richfaces.ui.common.meta.MetaComponentEncoder, org.richfaces.ui.common.meta.MetaComponentResolver, org.richfaces.ui.iteration.IterationStateHolder
  Direct Known Subclasses:
    UITree

      public abstract class AbstractTree
      extends org.richfaces.component.UIDataAdaptor
      implements org.richfaces.ui.common.meta.MetaComponentResolver, org.richfaces.ui.common.meta.MetaComponentEncoder, TreeSelectionChangeSource, TreeToggleSource

  The <rich:tree> component provides a hierarchical tree control. Each <rich:tree> component typically consists of <rich:treeNode> child components. The appearance and behavior of the tree and its nodes can be fully customized.

  Author:
    Nick Belaevski

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.richfaces.component.UIDataAdaptor

      `org.richfaces.component.UIDataAdaptor.ComponentVisitor`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `COMPONENT_FAMILY`
    `static String` | `COMPONENT_TYPE`
    `static String` | `DEFAULT_TREE_NODE_FACET_NAME`
    `static String` | `DEFAULT_TREE_NODE_ID`
    `static String` | `SELECTION_META_COMPONENT_ID`

    - ### Fields inherited from class org.richfaces.component.UIDataAdaptor

      `decodeVisitor, updateVisitor, validateVisitor`

    - ### Fields inherited from class javax.faces.component.UIComponent

      `ATTRS_WITH_DECLARED_DEFAULT_VALUES, BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, HONOR_CURRENT_COMPONENT_ATTRIBUTES_PARAM_NAME, VIEW_LOCATION_KEY`

    - ### Fields inherited from interface org.richfaces.ui.common.meta.MetaComponentResolver

      `META_COMPONENT_SEPARATOR_CHAR`

    - ### Fields inherited from interface javax.faces.component.NamingContainer

      `SEPARATOR_CHAR`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractTree()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addTreeSelectionChangeListener(TreeSelectionChangeListener listener)`
    `void` | `addTreeToggleListener(TreeToggleListener listener)`
    `void` | `broadcast(javax.faces.event.FacesEvent event)`
    `org.richfaces.model.DeclarativeModelKey` | `convertDeclarativeKeyFromString(javax.faces.context.FacesContext context, String modelId, String modelKeyAsString)`
    `String` | `convertDeclarativeKeyToString(javax.faces.context.FacesContext context, org.richfaces.model.DeclarativeModelKey declarativeKey)`
    `protected org.richfaces.model.DataComponentState` | `createComponentState()`
    `protected org.richfaces.model.ExtendedDataModel<?>` | `createExtendedDataModel()`
    `org.richfaces.model.TreeDataModelTuple` | `createSnapshot()`
    `protected Iterator<javax.faces.component.UIComponent>` | `dataChildren()`
    `void` | `encodeMetaComponent(javax.faces.context.FacesContext context, String metaComponentId)`
    `protected javax.faces.component.UIComponent` | `findDeclarativeModel(String modelId)`
    `protected Iterator<javax.faces.component.UIComponent>` | `findMatchingTreeNodeComponent(String nodeType, javax.faces.component.UIComponent parentComponent)`
    `AbstractTreeNode` | `findTreeNodeComponent()`
    `String` | `getFamily()`
    `abstract String` | `getNodeClass()`
    `abstract String` | `getNodeType()`
    `abstract String` | `getOnbeforenodetoggle()`
    `abstract String` | `getOnbeforeselectionchange()`
    `abstract String` | `getOnnodetoggle()`
    `abstract String` | `getOnselectionchange()`
    `javax.faces.convert.Converter` | `getRowKeyConverter()`
    `Collection<Object>` | `getSelection()`
    `abstract org.richfaces.component.SwitchType` | `getSelectionType()`
    `abstract String` | `getToggleNodeEvent()`
    `abstract org.richfaces.component.SwitchType` | `getToggleType()`
    `protected org.richfaces.model.TreeDataModel<?>` | `getTreeDataModel()`
    `protected TreeRange` | `getTreeRange()`
    `TreeSelectionChangeListener[]` | `getTreeSelectionChangeListeners()`
    `TreeToggleListener[]` | `getTreeToggleListeners()`
    `abstract Object` | `getValue()`
    `boolean` | `isExpanded()`
    `abstract boolean` | `isImmediate()`
    `boolean` | `isLeaf()`
    `void` | `removeTreeSelectionChangeListener(TreeSelectionChangeListener listener)`
    `void` | `removeTreeToggleListener(TreeToggleListener listener)`
    `protected void` | `resetDataModel()`
    `String` | `resolveClientId(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent contextComponent, String metaComponentId)`
    `protected void` | `restoreChildState(javax.faces.context.FacesContext facesContext)`
    `void` | `restoreFromSnapshot(javax.faces.context.FacesContext context, org.richfaces.model.TreeDataModelTuple tuple)`
    `void` | `setSelection(Collection<Object> selection)`
    `protected void` | `setupCurrentComponent()`
    `String` | `substituteUnresolvedClientId(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent contextComponent, String metaComponentId)`
    `protected boolean` | `visitFixedChildren(javax.faces.component.visit.VisitContext visitContext, javax.faces.component.visit.VisitCallback callback)`
    `void` | `walk(javax.faces.context.FacesContext faces, org.richfaces.model.DataVisitor visitor, Object argument)`
    `void` | `walkModel(javax.faces.context.FacesContext context, org.richfaces.model.TreeDataVisitor dataVisitor)`

    - ### Methods inherited from class org.richfaces.component.UIDataAdaptor

      `allFixedChildren, captureOrigValue, clearExtendedDataModel, clearInitialState, createUniqueId, doUpdate, extractKeySegment, fixedChildren, getComponentState, getContainerClientId, getContainerClientId, getExtendedDataModel, getIterationState, getLocalComponentState, getRowCount, getRowData, getRowKey, getRowKeyVar, getStateVar, getVar, getVariablesMap, invokeOnComponent, invokeOnRow, isKeepSaved, isListenerForSource, isRowAvailable, iterate, keepSaved, markInitialState, preDecode, preEncodeBegin, preUpdate, preValidate, processDecodes, processDecodesChildren, processEvent, processEvent, processUpdates, processUpdatesChildren, processValidatesChildren, processValidators, queueEvent, resetChildState, restoreChildState, restoreOrigValue, restoreState, saveChildState, saveChildState, saveState, setExtendedDataModel, setId, setIterationState, setKeepSaved, setRowKey, setRowKey, setRowKeyConverter, setRowKeyVar, setStateVar, setupVariable, setValueExpression, setVar, visitDataChildren, visitDataChildrenMetaComponents, visitTree, wrapEvent`

    - ### Methods inherited from class javax.faces.component.UIComponentBase

      `addClientBehavior, addFacesListener, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getPassThroughAttributes, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processRestoreState, processSaveState, removeFacesListener, restoreAttachedState, saveAttachedState, setParent, setRendered, setRendererType, setTransient, setValueBinding, subscribeToEvent, unsubscribeFromEvent`

    - ### Methods inherited from class javax.faces.component.UIComponent

      `encodeAll, getClientId, getCompositeComponentParent, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getPassThroughAttributes, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, pushComponentToEL, restoreTransientState, saveTransientState, setInView`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### COMPONENT_TYPE

          public static final String COMPONENT_TYPE

      See Also:
        Constant Field Values

    - #### COMPONENT_FAMILY

          public static final String COMPONENT_FAMILY

      See Also:
        Constant Field Values

    - #### SELECTION_META_COMPONENT_ID

          public static final String SELECTION_META_COMPONENT_ID

      See Also:
        Constant Field Values

    - #### DEFAULT_TREE_NODE_ID

          public static final String DEFAULT_TREE_NODE_ID

      See Also:
        Constant Field Values

    - #### DEFAULT_TREE_NODE_FACET_NAME

          public static final String DEFAULT_TREE_NODE_FACET_NAME

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### AbstractTree

          public AbstractTree()

  - ### Method Detail

    - #### getTreeRange

          protected TreeRange getTreeRange()

    - #### getValue

          public abstract Object getValue()

    - #### isImmediate

          public abstract boolean isImmediate()

    - #### getNodeClass

          public abstract String getNodeClass()

    - #### getOnnodetoggle

          public abstract String getOnnodetoggle()

    - #### getOnbeforenodetoggle

          public abstract String getOnbeforenodetoggle()

    - #### getOnselectionchange

          public abstract String getOnselectionchange()

    - #### getOnbeforeselectionchange

          public abstract String getOnbeforeselectionchange()

    - #### getToggleType

          public abstract org.richfaces.component.SwitchType getToggleType()

    - #### getSelectionType

          public abstract org.richfaces.component.SwitchType getSelectionType()

    - #### getNodeType

          public abstract String getNodeType()

    - #### getToggleNodeEvent

          public abstract String getToggleNodeEvent()

    - #### getFamily

          public String getFamily()

      Overrides:
        `getFamily` in class `org.richfaces.component.UIDataAdaptor`

    - #### getSelection

          public Collection<Object> getSelection()

    - #### setSelection

          public void setSelection(Collection<Object> selection)

    - #### createComponentState

          protected org.richfaces.model.DataComponentState createComponentState()

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

    - #### getRowKeyConverter

          public javax.faces.convert.Converter getRowKeyConverter()

      Overrides:
        `getRowKeyConverter` in class `org.richfaces.component.UIDataAdaptor`

    - #### findMatchingTreeNodeComponent

          protected Iterator<javax.faces.component.UIComponent> findMatchingTreeNodeComponent(String nodeType,
                                                                                  javax.faces.component.UIComponent parentComponent)

    - #### setupCurrentComponent

          protected void setupCurrentComponent()

    - #### findTreeNodeComponent

          public AbstractTreeNode findTreeNodeComponent()

    - #### broadcast

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

      Overrides:
        `broadcast` in class `org.richfaces.component.UIDataAdaptor`
      Throws:
        `javax.faces.event.AbortProcessingException`

    - #### visitFixedChildren

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

      Overrides:
        `visitFixedChildren` in class `org.richfaces.component.UIDataAdaptor`

    - #### encodeMetaComponent

          public void encodeMetaComponent(javax.faces.context.FacesContext context,
                                 String metaComponentId)
                                   throws IOException

      Specified by:
        `encodeMetaComponent` in interface `org.richfaces.ui.common.meta.MetaComponentEncoder`
      Throws:
        `IOException`

    - #### resolveClientId

          public String resolveClientId(javax.faces.context.FacesContext facesContext,
                               javax.faces.component.UIComponent contextComponent,
                               String metaComponentId)

      Specified by:
        `resolveClientId` in interface `org.richfaces.ui.common.meta.MetaComponentResolver`

    - #### substituteUnresolvedClientId

          public String substituteUnresolvedClientId(javax.faces.context.FacesContext facesContext,
                                            javax.faces.component.UIComponent contextComponent,
                                            String metaComponentId)

      Specified by:
        `substituteUnresolvedClientId` in interface `org.richfaces.ui.common.meta.MetaComponentResolver`

    - #### dataChildren

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

      Overrides:
        `dataChildren` in class `org.richfaces.component.UIDataAdaptor`

    - #### addTreeSelectionChangeListener

          public void addTreeSelectionChangeListener(TreeSelectionChangeListener listener)

      Specified by:
        `addTreeSelectionChangeListener` in interface `TreeSelectionChangeSource`

    - #### getTreeSelectionChangeListeners

          public TreeSelectionChangeListener[] getTreeSelectionChangeListeners()

    - #### removeTreeSelectionChangeListener

          public void removeTreeSelectionChangeListener(TreeSelectionChangeListener listener)

      Specified by:
        `removeTreeSelectionChangeListener` in interface `TreeSelectionChangeSource`

    - #### addTreeToggleListener

          public void addTreeToggleListener(TreeToggleListener listener)

      Specified by:
        `addTreeToggleListener` in interface `TreeToggleSource`

    - #### getTreeToggleListeners

          public TreeToggleListener[] getTreeToggleListeners()

    - #### removeTreeToggleListener

          public void removeTreeToggleListener(TreeToggleListener listener)

      Specified by:
        `removeTreeToggleListener` in interface `TreeToggleSource`

    - #### isExpanded

          public boolean isExpanded()

    - #### getTreeDataModel

          protected org.richfaces.model.TreeDataModel<?> getTreeDataModel()

    - #### isLeaf

          public boolean isLeaf()

    - #### walk

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

      Overrides:
        `walk` in class `org.richfaces.component.UIDataAdaptor`

    - #### createExtendedDataModel

          protected org.richfaces.model.ExtendedDataModel<?> createExtendedDataModel()

      Specified by:
        `createExtendedDataModel` in class `org.richfaces.component.UIDataAdaptor`

    - #### walkModel

          public void walkModel(javax.faces.context.FacesContext context,
                       org.richfaces.model.TreeDataVisitor dataVisitor)

    - #### resetDataModel

          protected void resetDataModel()

      Overrides:
        `resetDataModel` in class `org.richfaces.component.UIDataAdaptor`

    - #### createSnapshot

          public org.richfaces.model.TreeDataModelTuple createSnapshot()

    - #### restoreFromSnapshot

          public void restoreFromSnapshot(javax.faces.context.FacesContext context,
                                 org.richfaces.model.TreeDataModelTuple tuple)

    - #### restoreChildState

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

      Overrides:
        `restoreChildState` in class `org.richfaces.component.UIDataAdaptor`

    - #### findDeclarativeModel

          protected javax.faces.component.UIComponent findDeclarativeModel(String modelId)

    - #### convertDeclarativeKeyToString

          public String convertDeclarativeKeyToString(javax.faces.context.FacesContext context,
                                             org.richfaces.model.DeclarativeModelKey declarativeKey)
                                               throws javax.faces.convert.ConverterException

      Throws:
        `javax.faces.convert.ConverterException`

    - #### convertDeclarativeKeyFromString

          public org.richfaces.model.DeclarativeModelKey convertDeclarativeKeyFromString(javax.faces.context.FacesContext context,
                                                                                String modelId,
                                                                                String modelKeyAsString)
                                                                                  throws javax.faces.convert.ConverterException

      Throws:
        `javax.faces.convert.ConverterException`

Copyright © 2014 JBoss by Red Hat. All rights reserved.