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:
    javax.faces.component.NamingContainer, javax.faces.component.StateHolder, CollectionComponent, LocalRowKeyIndex, RowKeyIndex, TreeLocalRowKeyIndex
  Direct Known Subclasses:
    UIXMenuHierarchy, UIXNavigationHierarchy, UIXTree

      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 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

      `bindings`

    - ### 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.
    `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(VisitContext visitContext, VisitCallback callback, List<javax.faces.component.UIComponent> stamps, RowKeySet disclosedRowKeys)`
    `protected boolean` | `visitLevel(VisitContext visitContext, 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, createVarStatusMap, decodeChildrenImpl, defaultVisitChildren, encodeBegin, encodeEnd, 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, processFacetsAndChildren, processSaveState, queueEvent, resetStampState, restoreStampState, restoreState, saveStampState, saveState, setClientRowKey, setCurrencyString, setRowIndex, setRowKey, setSortCriteria, setVar, updateChildrenImpl, validateChildrenImpl, visitChildren, visitData, visitUnstampedFacets`

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

      `adaptMethodBinding, addAttributeChange, addAttributeChangeListener, addFacesListener, broadcastToMethodBinding, broadcastToMethodExpression, createFacesBean, decode, decodeChildren, encodeChildren, findComponent, getAttributeChangeListener, getAttributeChangeListeners, getAttributes, getBeanType, getBooleanProperty, getChildCount, getChildren, getClientId, getContainerClientId, getFacesBean, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacetNames, getFacets, getFacetsAndChildren, getFamily, getId, getIntProperty, getLifecycleRenderer, getParent, getProperty, getPropertyKey, getRenderer, getRendererType, getRendersChildren, getValueBinding, getValueExpression, invokeOnChildrenComponents, invokeOnNamingContainerComponent, isRendered, isTransient, markInitialState, processRestoreState, processUpdates, processValidators, removeAttributeChangeListener, removeFacesListener, satisfiesPartialTrigger, setAttributeChangeListener, setAttributeChangeListener, setBooleanProperty, setId, setIntProperty, setParent, setProperty, setRendered, setRendererType, setTransient, setValueBinding, setValueExpression, toString, updateChildren, validateChildren`

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

      `addPartialTarget, clearCachedClientIds, clearCachedClientIds, encodeFlattenedChild, encodeFlattenedChildren, getLogicalParent, getLogicalParent, isVisitable, partialEncodeVisit, processFlattenedChildren, processFlattenedChildren, processFlattenedChildren, processFlattenedChildren, setPartialTarget, setupChildrenVisitingContext, setupEncodingContext, setUpEncodingContext, setupVisitingContext, tearDownChildrenVisitingContext, tearDownEncodingContext, tearDownVisitingContext, visitTree, visitTree`

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

      `encodeAll`

    - ### 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)`

    - #### 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(VisitContext visitContext,
                           VisitCallback callback,
                           List<javax.faces.component.UIComponent> stamps)

    - #### visitHierarchy

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

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