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, TreeToggleSource, org.richfaces.ui.common.meta.MetaComponentEncoder, org.richfaces.ui.common.meta.MetaComponentResolver, org.richfaces.ui.iteration.IterationStateHolder
  Direct Known Subclasses:
    UITreeNode

      public abstract class AbstractTreeNode
      extends javax.faces.component.UIComponentBase
      implements org.richfaces.ui.common.meta.MetaComponentResolver, org.richfaces.ui.common.meta.MetaComponentEncoder, org.richfaces.ui.iteration.IterationStateHolder, TreeToggleSource

  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.ui.common.meta.MetaComponentResolver

      `META_COMPONENT_SEPARATOR_CHAR`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractTreeNode()`

  - ### Method Summary

    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()`
    `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.
    `abstract boolean` | `isImmediate()`
    `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)`
    `void` | `setExpanded(boolean newValue)`
    `void` | `setIterationState(Object state)`
    `String` | `substituteUnresolvedClientId(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent contextComponent, String metaComponentId)`
    `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, getPassThroughAttributes, 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, getPassThroughAttributes, 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`

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

    - #### isImmediate

          public abstract boolean isImmediate()

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

      Specified by:
        `getIterationState` in interface `org.richfaces.ui.iteration.IterationStateHolder`

    - #### setIterationState

          public void setIterationState(Object state)

      Specified by:
        `setIterationState` in interface `org.richfaces.ui.iteration.IterationStateHolder`

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

      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`

    - #### 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 `org.richfaces.ui.common.meta.MetaComponentEncoder`
      Throws:
        `IOException`

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