org.richfaces.component

## Class AbstractTreeNode

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

- All Implemented Interfaces:
    EventListener, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.component.TransientStateHolder, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder, IterationStateHolder, CoreProps, EventsKeyProps, EventsMouseProps, I18nProps, ImmediateProps, TreeCommonProps, MetaComponentEncoder, MetaComponentResolver, TreeToggleSource
  Direct Known Subclasses:
    UITreeNode

      public abstract class AbstractTreeNode
      extends javax.faces.component.UIComponentBase
      implements MetaComponentResolver, MetaComponentEncoder, IterationStateHolder, TreeToggleSource, CoreProps, EventsKeyProps, EventsMouseProps, ImmediateProps, I18nProps, TreeCommonProps

  The component is a child component of the component. It represents nodes in the parent tree. The appearance and functionality of each tree node can be customized.

  Author:
    Nick Belaevski

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `COMPONENT_FAMILY`
    `static String` | `COMPONENT_TYPE`
    `static String` | `SUBTREE_META_COMPONENT_ID`

    - ### 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.component.MetaComponentResolver

      `META_COMPONENT_SEPARATOR_CHAR`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractTreeNode()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addTreeToggleListener(TreeToggleListener listener)`
    `void` | `broadcast(javax.faces.event.FacesEvent event)`
    `void` | `encodeMetaComponent(javax.faces.context.FacesContext context, String metaComponentId)`
    `AbstractTree` | `findTreeComponent()`
    `String` | `getFamily()`
    `Object` | `getIterationState()` Get component state for a current iteration.
    `protected Boolean` | `getLocalExpandedValue(javax.faces.context.FacesContext facesContext)`
    `abstract String` | `getOnbeforetoggle()` The client-side script method to be called before the node is toggle.
    `abstract String` | `getOntoggle()` The client-side script method to be called after the node is toggle.
    `TreeToggleListener[]` | `getTreeToggleListeners()`
    `abstract String` | `getType()` The type of the this component.
    `boolean` | `isExpanded()` Determines if this tree node is expanded.
    `void` | `queueEvent(javax.faces.event.FacesEvent event)`
    `void` | `removeTreeToggleListener(TreeToggleListener listener)`
    `String` | `resolveClientId(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent contextComponent, String metaComponentId)` Resolves and returns string identifying supported meta-component or `null` if provided meta-component name is not a supported one.
    `void` | `setExpanded(boolean newValue)`
    `void` | `setIterationState(Object state)` Set component state for the next iteration.
    `String` | `substituteUnresolvedClientId(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent contextComponent, String metaComponentId)` Provides replacement for unresolved meta-component names.
    `boolean` | `visitTree(javax.faces.component.visit.VisitContext context, javax.faces.component.visit.VisitCallback callback)`

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

      `addClientBehavior, addFacesListener, clearInitialState, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, markInitialState, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, removeFacesListener, restoreAttachedState, restoreState, saveAttachedState, saveState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, 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, setValueExpression`

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

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

    - ### Methods inherited from interface org.richfaces.component.attribute.CoreProps

      `getStyle, getStyleClass, getTitle`

    - ### Methods inherited from interface org.richfaces.component.attribute.EventsKeyProps

      `getOnkeydown, getOnkeypress, getOnkeyup`

    - ### Methods inherited from interface org.richfaces.component.attribute.EventsMouseProps

      `getOnclick, getOndblclick, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup`

    - ### Methods inherited from interface org.richfaces.component.attribute.ImmediateProps

      `isImmediate`

    - ### Methods inherited from interface org.richfaces.component.attribute.I18nProps

      `getDir, getLang`

    - ### Methods inherited from interface org.richfaces.component.attribute.TreeCommonProps

      `getHandleClass, getIconClass, getIconCollapsed, getIconExpanded, getIconLeaf, getLabelClass, getToggleListener`

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

    - #### SUBTREE_META_COMPONENT_ID

          public static final String SUBTREE_META_COMPONENT_ID

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### AbstractTreeNode

          public AbstractTreeNode()

  - ### Method Detail

    - #### getFamily

          public String getFamily()

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

    - #### getType

          public abstract String getType()

      The type of the this component. More treeNodes could be defined in tree with different types and it is decided about which is used for rendering by nodeType expression of tree component.

    - #### getOntoggle

          public abstract String getOntoggle()

      The client-side script method to be called after the node is toggle.

    - #### getOnbeforetoggle

          public abstract String getOnbeforetoggle()

      The client-side script method to be called before the node is toggle.

    - #### getLocalExpandedValue

          protected Boolean getLocalExpandedValue(javax.faces.context.FacesContext facesContext)

    - #### isExpanded

          public boolean isExpanded()

      Determines if this tree node is expanded. When EL expression used, it should use request-scoped variable with name defied in tree attribute 'var' which points to current node.

    - #### setExpanded

          public void setExpanded(boolean newValue)

    - #### getIterationState

          public Object getIterationState()

      Description copied from interface: `IterationStateHolder`
      Get component state for a current iteration.
      Specified by:
        `getIterationState` in interface `IterationStateHolder`
      Returns:
        request-scope component state. Details are subject for a component implementation

    - #### setIterationState

          public void setIterationState(Object state)

      Description copied from interface: `IterationStateHolder`
      Set component state for the next iteration. State can be either previously saved iteration state or `null` value. In the second case component should reset its state to the initial.
      Specified by:
        `setIterationState` in interface `IterationStateHolder`
      Parameters:
        `state` - request-scope component state or `null`. Details are subject for a component implementation

    - #### findTreeComponent

          public AbstractTree findTreeComponent()

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

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

    - #### resolveClientId

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

      Description copied from interface: `MetaComponentResolver`
      Resolves and returns string identifying supported meta-component or `null` if provided meta-component name is not a supported one.
      Specified by:
        `resolveClientId` in interface `MetaComponentResolver`
      Parameters:
        `facesContext` - - current instance of `FacesContext`
        `contextComponent` - - instance of `UIComponent` that requested resolution of meta-component
        `metaComponentId` - - name of meta-component (without leading '@' sign)
      Returns:
        clientId, one of supported meta-names such as @all, @this, etc. or `null`

    - #### substituteUnresolvedClientId

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

      Description copied from interface: `MetaComponentResolver`
      Provides replacement for unresolved meta-component names. Returns identifier string for the chosen substitution or `null`
      Specified by:
        `substituteUnresolvedClientId` in interface `MetaComponentResolver`
      Parameters:
        `facesContext` - - current instance of `FacesContext`
        `contextComponent` - - instance of `UIComponent` that requested resolution of meta-component
        `metaComponentId` - - name of meta-component (without leading '@' sign)
      Returns:
        clientId, one of supported meta-names such as @all, @this, etc. or `null`

    - #### visitTree

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

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

    - #### encodeMetaComponent

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

      Specified by:
        `encodeMetaComponent` in interface `MetaComponentEncoder`
      Throws:
        `IOException`

Copyright © 2016 JBoss by Red Hat. All Rights Reserved.