org.icefaces.ace.component.tree

## Class Tree<N>

- java.lang.Object
- - javax.faces.component.UIComponent
  - - javax.faces.component.UIComponentBase
    - - javax.faces.component.UIData
      - - org.icefaces.ace.component.tree.TreeBase
        - - org.icefaces.ace.component.tree.Tree<N>

- All Implemented Interfaces:
    java.io.Serializable, java.util.EventListener, javax.faces.component.behavior.ClientBehaviorHolder, 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.SystemEventListenerHolder, IceClientBehaviorHolder, ITree

      public class Tree<N>
      extends TreeBase
      implements java.io.Serializable

  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class org.icefaces.ace.component.tree.TreeBase

      `COMPONENT_TYPE, RENDERER_TYPE`

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

      `COMPONENT_FAMILY`

    - ### 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
    Constructor and Description
    `Tree()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `broadcast(javax.faces.event.FacesEvent event)`
    `protected java.util.Iterator<java.util.Map.Entry<NodeKey,N>>` | `children()`
    `java.lang.String` | `getClientId(javax.faces.context.FacesContext context)`
    `N` | `getData()`
    `protected javax.faces.model.DataModel` | `getDataModel()`
    `NodeKey` | `getKey()`
    `KeySegmentConverter` | `getKeyConverter()` Return the value of the `keyConverter` property.
    `Node` | `getNodeForType()`
    `NodeState` | `getNodeState()`
    `NodeStateMap` | `getStateMap()` Return the value of the `stateMap` property.
    `void` | `insertNode(N node, int index)` Insert a node as a child of the current node.
    `boolean` | `invokeOnComponent(javax.faces.context.FacesContext context, java.lang.String clientId, javax.faces.component.ContextCallback callback)`
    `boolean` | `isLeaf()`
    `boolean` | `isNodeAvailable()`
    `void` | `processDecodes(javax.faces.context.FacesContext context)`
    `void` | `processUpdates(javax.faces.context.FacesContext context)`
    `void` | `processValidators(javax.faces.context.FacesContext context)`
    `void` | `queueEvent(javax.faces.event.FacesEvent event)`
    `void` | `removeNode(java.lang.Object segOrNode, boolean isSegment)` Remove a node from the children of the current node.
    `protected void` | `restoreNodeContext(java.util.Map.Entry<NodeKey,N> node)`
    `protected void` | `saveNodeContext(java.util.Map.Entry<NodeKey,N> node)`
    `protected void` | `setDataModel(javax.faces.model.DataModel model)`
    `void` | `setKey(NodeKey key)`
    `N` | `setNodeToChild(java.lang.Object keySegment)`
    `N` | `setNodeToKey(NodeKey key)`
    `N` | `setNodeToParent()`
    `N` | `setNodeToRoot()`
    `N` | `setNodeToSibling(java.lang.Object keySegment)`
    `protected java.lang.String` | `UIComponentBase_getClientId(javax.faces.context.FacesContext context)`
    `boolean` | `visitTree(javax.faces.component.visit.VisitContext context, javax.faces.component.visit.VisitCallback callback)`

    - ### Methods inherited from class org.icefaces.ace.component.tree.TreeBase

      `addClientBehavior, getDefaultEventName, getDefaultExecute, getDefaultRender, getEventNames, getExpansionMode, getFamily, getIconFacet, getListenerArgument, getSelectionMode, getStateCreationCallback, getStateVar, getType, isExpansion, isPropertySet, isReordering, isSelection, isSelectMultiple, setExpansion, setExpansionMode, setIconFacet, setKeyConverter, setReordering, setSelection, setSelectionMode, setSelectMultiple, setStateCreationCallback, setStateMap, setStateVar, setType, setValueExpression`

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

      `createUniqueId, encodeBegin, getFirst, getFooter, getHeader, getRowCount, getRowData, getRowIndex, getRows, getValue, getVar, isRowAvailable, isRowStatePreserved, markInitialState, restoreState, saveState, setFirst, setFooter, setHeader, setRowIndex, setRows, setRowStatePreserved, setValue, setValueBinding, setVar`

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

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

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

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

    - ### 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.behavior.ClientBehaviorHolder

      `getClientBehaviors`

- - ### Constructor Detail

    - #### Tree

          public Tree()

  - ### Method Detail

    - #### getNodeState

          public NodeState getNodeState()

    - #### getStateMap

          public NodeStateMap getStateMap()

      Description copied from class: `TreeBase`

      Return the value of the `stateMap` property.

      Contents: Define a NodeStateMap ValueExpression to access the store of Tree node object state information. The state map provides an API for looking up the state of a particular node object, as well as reverse look-ups to get node objects with a particular state.

      Specified by:
        `getStateMap` in interface `ITree`
      Overrides:
        `getStateMap` in class `TreeBase`

    - #### insertNode

          public void insertNode(N node,
                                 int index)

      Insert a node as a child of the current node.
      Parameters:
        `node` - the node to be inserted
        `index` - where to insert the node

    - #### removeNode

          public void removeNode(java.lang.Object segOrNode,
                                 boolean isSegment)

      Remove a node from the children of the current node.
      Parameters:
        `segOrNode` - the node to be removed or identifying key segment
        `isSegment` - identify if the first argument is a node or segment

    - #### isLeaf

          public boolean isLeaf()

    - #### getData

          public N getData()

    - #### setKey

          public void setKey(NodeKey key)

    - #### getKey

          public NodeKey getKey()

    - #### isNodeAvailable

          public boolean isNodeAvailable()

    - #### children

          protected java.util.Iterator<java.util.Map.Entry<NodeKey,N>> children()

    - #### setNodeToRoot

          public N setNodeToRoot()

    - #### setNodeToKey

          public N setNodeToKey(NodeKey key)

    - #### setNodeToParent

          public N setNodeToParent()

    - #### setNodeToChild

          public N setNodeToChild(java.lang.Object keySegment)

    - #### setNodeToSibling

          public N setNodeToSibling(java.lang.Object keySegment)

    - #### getNodeForType

          public Node getNodeForType()

    - #### getKeyConverter

          public KeySegmentConverter getKeyConverter()

      Description copied from class: `TreeBase`

      Return the value of the `keyConverter` property.

      Contents: Optionally define a custom KeySegmentConverter object to produce segmented identifier keys for nodes based on something other than indexes.

      Specified by:
        `getKeyConverter` in interface `ITree`
      Overrides:
        `getKeyConverter` in class `TreeBase`

    - #### getDataModel

          protected javax.faces.model.DataModel getDataModel()

      Overrides:
        `getDataModel` in class `javax.faces.component.UIData`

    - #### setDataModel

          protected void setDataModel(javax.faces.model.DataModel model)

      Overrides:
        `setDataModel` in class `javax.faces.component.UIData`

    - #### queueEvent

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

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

    - #### processUpdates

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

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

    - #### processDecodes

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

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

    - #### processValidators

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

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

    - #### broadcast

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

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

    - #### visitTree

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

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

    - #### restoreNodeContext

          protected void restoreNodeContext(java.util.Map.Entry<NodeKey,N> node)

    - #### saveNodeContext

          protected void saveNodeContext(java.util.Map.Entry<NodeKey,N> node)

    - #### 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.UIData`
      Throws:
        `javax.faces.FacesException`

    - #### UIComponentBase_getClientId

          protected java.lang.String UIComponentBase_getClientId(javax.faces.context.FacesContext context)

    - #### getClientId

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

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

Copyright 2025 ICEsoft Technologies Canada, Corp. All Rights Reserved.