org.apache.myfaces.trinidad.component

## Class UIXHierarchy

- java.lang.Object
- - javax.faces.component.UIComponent
  - - org.apache.myfaces.trinidad.component.UIXComponent
    - - org.apache.myfaces.trinidad.component.UIXComponentBase
      - - org.apache.myfaces.trinidad.component.UIXCollection
        - - org.apache.myfaces.trinidad.component.UIXHierarchy

- All Implemented Interfaces:
    EventListener, javax.faces.component.NamingContainer, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.component.TransientStateHolder, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder, CollectionComponent, LocalRowKeyIndex, RowKeyIndex, TreeLocalRowKeyIndex
  Direct Known Subclasses:
    UIXMenuHierarchy, UIXNavigationHierarchy, UIXTree

      @JSFComponent
      public abstract class UIXHierarchy
      extends UIXCollection
      implements CollectionComponent, LocalRowKeyIndex, TreeLocalRowKeyIndex

  Base class for components that take a TreeModel, which is a hierarchical model.
  Version:
    $Name: $ ($Revision: adfrt/faces/adf-faces-api/src/main/java/oracle/adf/view/faces/component/UIXHierarchy.java#0 $) $Date: 10-nov-2005.19:09:52 $

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.myfaces.trinidad.component.UIXCollection

      `UIXCollection.NoColumnFacetsVisitContext`

    - ### Nested classes/interfaces inherited from class org.apache.myfaces.trinidad.component.UIXComponentBase

      `UIXComponentBase.ComponentSystemEventListenerWrapper`

    - ### Nested classes/interfaces inherited from interface org.apache.myfaces.trinidad.model.LocalRowKeyIndex

      `LocalRowKeyIndex.Confidence, LocalRowKeyIndex.LocalCachingStrategy`

  - ### Field Summary

    - ### Fields inherited from class org.apache.myfaces.trinidad.component.UIXCollection

      `TYPE, VAR_KEY`

    - ### Fields inherited from class org.apache.myfaces.trinidad.component.UIXComponentBase

      `BINDING_KEY, ID_KEY, RENDERED_KEY, RENDERER_TYPE_KEY, TRANSIENT_KEY`

    - ### 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 javax.faces.component.NamingContainer

      `SEPARATOR_CHAR`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `UIXHierarchy()`
    `protected` | `UIXHierarchy(String rendererType)` Create a Page component with the given render-type

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `areRowsLocallyAvailable(int startIndex, int rowCount, RowKeySet disclosedRowKeys)` Check if a range of rows is locally available starting from a row index.
    `boolean` | `areRowsLocallyAvailable(int rowCount, RowKeySet disclosedRowKeys)` Check if a range of rows is locally available starting from current position.
    `boolean` | `areRowsLocallyAvailable(Object startRowKey, int rowCount, RowKeySet disclosedRowKeys)` Check if a range of rows is locally available starting from a row key.
    `CollectionModel` | `createCollectionModel(CollectionModel current, Object value)` Creates the CollectionModel to use with this component.
    `protected Map<String,Object>` | `createVarStatusMap()` Enhances the varStatusMap created by the super class to include: "hierarchicalIndex" - returns an array containing the row indices of heirarchy of the currrent row, for e.g.
    `void` | `enterContainer()` Treats the current element as a parent element and steps into the children.
    `void` | `exitContainer()` Changes the rowData to be the parent rowData.
    `List<Object>` | `getAllAncestorContainerRowKeys(Object childRowKey)` Gets the all the rowKeys of the ancestors of the given child row.
    `Object` | `getContainerRowKey()` Gets the rowKey of the current row's container.
    `Object` | `getContainerRowKey(Object childKey)` Gets the rowKey of the given row's container.
    `int` | `getDepth()` Gets the depth of the current row in this tree hierarchy
    `int` | `getDepth(Object rowKey)` Gets the depth of the current row in this tree hierarchy
    `int` | `getFirst()` Gets the index of the first visible row in this tree
    `abstract Object` | `getFocusRowKey()`
    `int` | `getRows()` Gets the maximum number of rows that this tree should show at a time.
    `protected List<javax.faces.component.UIComponent>` | `getStamps()` Gets the UIComponents that are considered stamps.
    `protected TreeModel` | `getTreeModel()` Gets the TreeModel that this tree is displaying.
    `boolean` | `isChildCollectionLocallyAvailable()` Indicates whether data for a child model (children of the current node) is locally available.
    `boolean` | `isChildCollectionLocallyAvailable(int index)` Indicates whether child data for the node with the given index is locally available.
    `boolean` | `isChildCollectionLocallyAvailable(Object rowKey)` Indicates whether child data for the node with the given row key is locally available.
    `boolean` | `isContainer()` Checks to see if the current element is a container of other elements.
    `boolean` | `isContainerEmpty()` Checks to see if the container is empty.
    `protected boolean` | `visitHierarchy(javax.faces.component.visit.VisitContext visitContext, javax.faces.component.visit.VisitCallback callback, List<javax.faces.component.UIComponent> stamps, RowKeySet disclosedRowKeys)`
    `protected boolean` | `visitLevel(javax.faces.component.visit.VisitContext visitContext, javax.faces.component.visit.VisitCallback callback, List<javax.faces.component.UIComponent> stamps)`

    - ### Methods inherited from class org.apache.myfaces.trinidad.component.UIXCollection

      `areRowsAvailable, areRowsAvailable, areRowsAvailable, areRowsLocallyAvailable, areRowsLocallyAvailable, areRowsLocallyAvailable, broadcast, clearCachedRow, clearCachedRow, clearCachedRows, clearCachedRows, clearCurrencyStringCache, clearLocalCache, decodeChildrenImpl, defaultVisitChildren, encodeBegin, encodeEnd, ensureRowsAvailable, getCachingStrategy, getClientRowKey, getClientRowKeyManager, getCollectionModel, getCollectionModel, getContainerClientId, getCurrencyString, getEstimatedRowCount, getEstimatedRowCountConfidence, getRowCount, getRowData, getRowData, getRowData, getRowIndex, getRowKey, getSortCriteria, getValue, getVar, getVarStatus, invokeOnComponent, isRowAvailable, isRowAvailable, isRowAvailable, isRowLocallyAvailable, isRowLocallyAvailable, isSortable, postCreateCollectionModel, postRowDataChange, preRowDataChange, processComponent, processDecodes, processEvent, processFacetsAndChildren, processFlattenedChildrenBegin, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, resetStampState, restoreStampState, restoreState, saveStampState, saveState, setClientRowKey, setCurrencyString, setRowIndex, setRowKey, setSortCriteria, setupELVariable, setupVisitingContext, setVar, tearDownVisitingContext, updateChildrenImpl, validateChildrenImpl, visitChildren, visitChildrenWithoutIterating, visitData, visitUnstampedFacets`

    - ### Methods inherited from class org.apache.myfaces.trinidad.component.UIXComponentBase

      `adaptMethodBinding, addAttributeChange, addAttributeChangeListener, addClientBehavior, addComponentChange, addComponentChange, addComponentChangeFilter, addFacesListener, broadcastToMethodBinding, broadcastToMethodExpression, clearCachedClientIds, clearInitialState, createFacesBean, decode, decodeChildren, encodeChildren, findComponent, getAttributeChangeListener, getAttributeChangeListeners, getAttributes, getBeanType, getBooleanProperty, getChildCount, getChildren, getClientBehaviors, getClientId, getComponentChangeFilters, getContainerClientId, getDefaultEventName, getFacesBean, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacetNames, getFacets, getFacetsAndChildren, getFamily, getId, getIntProperty, getLifecycleRenderer, getListenersForEventClass, getParent, getProperty, getPropertyKey, getRenderedFacetsAndChildren, getRenderer, getRendererType, getRendersChildren, getValueBinding, getValueExpression, initialStateMarked, invokeOnChildrenComponents, invokeOnNamingContainerComponent, isRendered, isTransient, markInitialState, removeAttributeChangeListener, removeComponentChangeFilter, removeFacesListener, satisfiesPartialTrigger, setAttributeChangeListener, setAttributeChangeListener, setBooleanProperty, setId, setIntProperty, setParent, setProperty, setRendered, setRendererType, setTransient, setupFlattenedChildrenContext, setupFlattenedContext, setValueBinding, setValueExpression, subscribeToEvent, tearDownFlattenedChildrenContext, tearDownFlattenedContext, toString, unsubscribeFromEvent, updateChildren, validateChildren`

    - ### Methods inherited from class org.apache.myfaces.trinidad.component.UIXComponent

      `addPartialTarget, broadcastInContext, clearCachedClientIds, defaultGetRenderedFacetsAndChildren, encodeFlattenedChild, encodeFlattenedChildren, getLogicalParent, getLogicalParent, getStateHelper, getStateHelper, isVisitable, partialEncodeVisit, processFlattenedChildren, processFlattenedChildren, processFlattenedChildren, processFlattenedChildren, setPartialTarget, setupChildrenEncodingContext, setupChildrenVisitingContext, setupEncodingContext, setUpEncodingContext, tearDownChildrenEncodingContext, tearDownChildrenVisitingContext, tearDownEncodingContext, visitAllChildren, visitChildren, visitTree, visitTree`

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

      `encodeAll, getClientId, getCompositeComponentParent, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getResourceBundleMap, getTransientStateHelper, getTransientStateHelper, isCompositeComponent, isInView, popComponentFromEL, pushComponentToEL, restoreTransientState, saveTransientState, setInView`

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

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

    - ### Methods inherited from interface org.apache.myfaces.trinidad.component.CollectionComponent

      `getVar`

    - ### Methods inherited from interface org.apache.myfaces.trinidad.model.RowKeyIndex

      `areRowsAvailable, areRowsAvailable, areRowsAvailable, getRowCount, getRowData, getRowData, getRowData, getRowIndex, getRowKey, isRowAvailable, isRowAvailable, isRowAvailable, setRowIndex, setRowKey`

    - ### Methods inherited from interface org.apache.myfaces.trinidad.model.LocalRowKeyIndex

      `areRowsLocallyAvailable, areRowsLocallyAvailable, areRowsLocallyAvailable, clearCachedRow, clearCachedRow, clearCachedRows, clearCachedRows, clearLocalCache, getCachingStrategy, getEstimatedRowCount, getEstimatedRowCountConfidence, isRowLocallyAvailable, isRowLocallyAvailable`

- - ### Constructor Detail

    - #### UIXHierarchy

          protected UIXHierarchy(String rendererType)

      Create a Page component with the given render-type

    - #### UIXHierarchy

          protected UIXHierarchy()

  - ### Method Detail

    - #### createCollectionModel

          public CollectionModel createCollectionModel(CollectionModel current,
                                              Object value)

      Description copied from class: `UIXCollection`
      Creates the CollectionModel to use with this component. The state of the UIComponent with the new model instance is not fully initialized until after this method returns. As a result, other component attributes that need a fully initialized model should not be initialized in this method. Instead, model-dependent initialization should be done in `postCreateCollectionModel`
      Specified by:
        `createCollectionModel` in class `UIXCollection`
      Parameters:
        `current` - the current CollectionModel, or null if there is none.
        `value` - this is the value returned from `UIXCollection.getValue()`
      See Also:
        `UIXCollection.postCreateCollectionModel(org.apache.myfaces.trinidad.model.CollectionModel)`

    - #### getFirst

          public int getFirst()

      Gets the index of the first visible row in this tree
      Specified by:
        `getFirst` in interface `CollectionComponent`
      Returns:
        zero-based index. not implemented yet.

    - #### getRows

          public int getRows()

      Gets the maximum number of rows that this tree should show at a time.
      Specified by:
        `getRows` in interface `CollectionComponent`
      Returns:
        not implemented yet.

    - #### enterContainer

          public final void enterContainer()

      Treats the current element as a parent element and steps into the children. A new path is constructed by appending the null value to the old path. The rowData becomes null. It is legal to call this method only if `isContainer()` returns true.
      See Also:
        `TreeModel.enterContainer()`

    - #### exitContainer

          public final void exitContainer()

      Changes the rowData to be the parent rowData. A new path is constructed by removing the last rowKey from the old path. The element that is identified by the new path is made current.
      See Also:
        `TreeModel.exitContainer()`

    - #### isContainer

          public final boolean isContainer()

      Checks to see if the current element is a container of other elements.
      Returns:
        true if the current element contains other elements.
      See Also:
        `TreeModel.isContainer()`

    - #### isContainerEmpty

          public boolean isContainerEmpty()

      Checks to see if the container is empty.
      Returns:
        true if the current container element has no children.
      See Also:
        `TreeModel.isContainerEmpty()`

    - #### getDepth

          public int getDepth()

      Gets the depth of the current row in this tree hierarchy
      Returns:
        zero for any root rows.
      See Also:
        `TreeModel.getDepth()`

    - #### getDepth

          public int getDepth(Object rowKey)

      Gets the depth of the current row in this tree hierarchy
      Returns:
        zero for any root rows.
      See Also:
        `TreeModel.getDepth(Object)`

    - #### getContainerRowKey

          public Object getContainerRowKey()

      Gets the rowKey of the current row's container.
      See Also:
        `TreeModel.getContainerRowKey()`

    - #### getContainerRowKey

          public Object getContainerRowKey(Object childKey)

      Gets the rowKey of the given row's container.
      See Also:
        `TreeModel.getContainerRowKey(Object)`

    - #### getAllAncestorContainerRowKeys

          public List<Object> getAllAncestorContainerRowKeys(Object childRowKey)

      Gets the all the rowKeys of the ancestors of the given child row.
      See Also:
        `TreeModel.getAllAncestorContainerRowKeys(Object)`

    - #### isChildCollectionLocallyAvailable

          public boolean isChildCollectionLocallyAvailable()

      Indicates whether data for a child model (children of the current node) is locally available.
      Specified by:
        `isChildCollectionLocallyAvailable` in interface `TreeLocalRowKeyIndex`
      Returns:
        true if child data is locally available
      See Also:
        `TreeModel.isChildCollectionLocallyAvailable()`

    - #### isChildCollectionLocallyAvailable

          public boolean isChildCollectionLocallyAvailable(int index)

      Indicates whether child data for the node with the given index is locally available.
      Specified by:
        `isChildCollectionLocallyAvailable` in interface `TreeLocalRowKeyIndex`
      Parameters:
        `index` - row index to check
      Returns:
        true if child data is available, false otherwise
      See Also:
        `TreeModel.isChildCollectionLocallyAvailable(int)`

    - #### isChildCollectionLocallyAvailable

          public boolean isChildCollectionLocallyAvailable(Object rowKey)

      Indicates whether child data for the node with the given row key is locally available.
      Specified by:
        `isChildCollectionLocallyAvailable` in interface `TreeLocalRowKeyIndex`
      Parameters:
        `rowKey` - row key to check
      Returns:
        true if child data is available, false otherwise
      See Also:
        `TreeModel.isChildCollectionLocallyAvailable(Object)`

    - #### areRowsLocallyAvailable

          public boolean areRowsLocallyAvailable(int startIndex,
                                        int rowCount,
                                        RowKeySet disclosedRowKeys)

      Check if a range of rows is locally available starting from a row index. The range can include child nodes in any expanded nodes within the range.
      Specified by:
        `areRowsLocallyAvailable` in interface `TreeLocalRowKeyIndex`
      Parameters:
        `startIndex` - staring index for the range
        `rowCount` - number of rows in the range
        `disclosedRowKeys` - set of expanded nodes which may fall within the range to check for availability
      Returns:
        `true` if range of rows is locally available `flase` otherwise
      See Also:
        `TreeModel.areRowsLocallyAvailable(int, int, RowKeySet)`

    - #### areRowsLocallyAvailable

          public boolean areRowsLocallyAvailable(Object startRowKey,
                                        int rowCount,
                                        RowKeySet disclosedRowKeys)

      Check if a range of rows is locally available starting from a row key. The range can include child nodes in any expanded nodes within the range.
      Specified by:
        `areRowsLocallyAvailable` in interface `TreeLocalRowKeyIndex`
      Parameters:
        `startRowKey` - staring row key for the range
        `rowCount` - number of rows in the range
        `disclosedRowKeys` - set of expanded nodes which may fall within the range to check for availability
      Returns:
        `true` if range of rows is locally available `flase` otherwise
      See Also:
        `TreeModel.areRowsLocallyAvailable(Object, int, RowKeySet)`

    - #### areRowsLocallyAvailable

          public boolean areRowsLocallyAvailable(int rowCount,
                                        RowKeySet disclosedRowKeys)

      Check if a range of rows is locally available starting from current position. The range can include child nodes in any expanded nodes within the range.
      Specified by:
        `areRowsLocallyAvailable` in interface `TreeLocalRowKeyIndex`
      Parameters:
        `rowCount` - number of rows in the range
        `disclosedRowKeys` - set of expanded nodes which may fall within the range to check for availability
      Returns:
        `true` if range of rows is locally available `flase` otherwise
      See Also:
        `TreeModel.areRowsLocallyAvailable(int , RowKeySet)`

    - #### createVarStatusMap

          protected Map<String,Object> createVarStatusMap()

      Enhances the varStatusMap created by the super class to include:
      - "hierarchicalIndex" - returns an array containing the row indices of heirarchy of the currrent row, for e.g. [0,1,2] This attribute is expensive to compute because of moving currency to calculate the row index for each parent collection in the tree hierarchy.
      - "hierarchicalLabel" - returns a string label representing the hierarchy of that row, for e.g. 1.1, 1.1.1. The labels are 1 based vs 0 based for rowIndex. This attribute is expensive to compute because of moving currency to calculate the row index for each parent collection in the tree hierarchy.
      Overrides:
        `createVarStatusMap` in class `UIXCollection`

    - #### getTreeModel

          protected final TreeModel getTreeModel()

      Gets the TreeModel that this tree is displaying.

    - #### getStamps

          protected List<javax.faces.component.UIComponent> getStamps()

      Description copied from class: `UIXCollection`
      Gets the UIComponents that are considered stamps. This implementation simply returns the children of this component.
      Overrides:
        `getStamps` in class `UIXCollection`
      Returns:
        each element must be of type UIComponent.

    - #### getFocusRowKey

          public abstract Object getFocusRowKey()

    - #### visitLevel

          protected final boolean visitLevel(javax.faces.component.visit.VisitContext visitContext,
                           javax.faces.component.visit.VisitCallback callback,
                           List<javax.faces.component.UIComponent> stamps)

    - #### visitHierarchy

          protected final boolean visitHierarchy(javax.faces.component.visit.VisitContext visitContext,
                               javax.faces.component.visit.VisitCallback callback,
                               List<javax.faces.component.UIComponent> stamps,
                               RowKeySet disclosedRowKeys)

Copyright © 2001-2017 The Apache Software Foundation. All Rights Reserved.