org.richfaces.context

## Class BaseExtendedVisitContext

- java.lang.Object
- - javax.faces.component.visit.VisitContext
  - - javax.faces.component.visit.VisitContextWrapper
    - - org.richfaces.context.ExtendedVisitContext
      - - org.richfaces.context.BaseExtendedVisitContext

- All Implemented Interfaces:
    javax.faces.FacesWrapper<javax.faces.component.visit.VisitContext>
  Direct Known Subclasses:
    ExtendedExecuteVisitContext, ExtendedRenderVisitContext

      public class BaseExtendedVisitContext
      extends ExtendedVisitContext

  `ExtendedVisitContext` that allows track visit of implicitly processed subtrees and adds support for shortIds
  Author:
    Nick Belaevski

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected static interface` | `BaseExtendedVisitContext.ClientIdTrackingStrategy` Allows to track what subtrees and shortIds were visited

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected BaseExtendedVisitContext.ClientIdTrackingStrategy` | `addNode` Tracking strategy that adds a node to the list of tracked subtree/shortIds
    `protected BaseExtendedVisitContext.ClientIdTrackingStrategy` | `removeNode` Tracking strategy that removes a node from the list of tracked subtree/shortIds

    - ### Fields inherited from class org.richfaces.context.ExtendedVisitContext

      `META_COMPONENT_ID`

    - ### Fields inherited from class javax.faces.component.visit.VisitContext

      `ALL_IDS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BaseExtendedVisitContext(javax.faces.component.visit.VisitContext visitContextToWrap, javax.faces.context.FacesContext facesContext, Collection<String> clientIds, Set<javax.faces.component.visit.VisitHint> hints, ExtendedVisitContextMode contextMode)` Creates a PartialVisitorContext instance with the specified hints.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `addDirectSubtreeIdsToVisitForImplicitComponents(javax.faces.component.UIComponent component, Set<String> result)` Allows to add subtrees that contains implicit components to list IDs to visit
    `javax.faces.component.visit.VisitContext` | `createNamingContainerVisitContext(javax.faces.component.UIComponent component, Collection<String> directIds)`
    `Collection<String>` | `getDirectSubtreeIdsToVisit(javax.faces.component.UIComponent component)`
    `Collection<String>` | `getIdsToVisit()`
    `Collection<String>` | `getSubtreeIdsToVisit(javax.faces.component.UIComponent component)`
    `protected boolean` | `hasImplicitSubtreeIdsToVisit(javax.faces.component.UIComponent component)` Return true whether this `VisitContext` allows to visit implicit IDs
    `javax.faces.component.visit.VisitResult` | `invokeVisitCallback(javax.faces.component.UIComponent component, javax.faces.component.visit.VisitCallback callback)`
    `protected javax.faces.component.visit.VisitResult` | `invokeVisitCallbackForImplicitComponent(javax.faces.component.UIComponent component, javax.faces.component.visit.VisitCallback callback)`
    `protected boolean` | `shouldCompleteOnEmptyIds()`
    `protected void` | `visitClientId(String clientId, BaseExtendedVisitContext.ClientIdTrackingStrategy tracker)` Use the `BaseExtendedVisitContext.ClientIdTrackingStrategy` implementations to either add or remove subtrees/shortIds collections

    - ### Methods inherited from class org.richfaces.context.ExtendedVisitContext

      `buildExtendedClientId, buildExtendedComponentId, getFacesContext, getVisitMode, getWrapped, invokeMetaComponentVisitCallback`

    - ### Methods inherited from class javax.faces.component.visit.VisitContextWrapper

      `getHints`

    - ### Methods inherited from class javax.faces.component.visit.VisitContext

      `createVisitContext, createVisitContext`

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

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

- - ### Field Detail

    - #### addNode

          protected final BaseExtendedVisitContext.ClientIdTrackingStrategy addNode

      Tracking strategy that adds a node to the list of tracked subtree/shortIds

    - #### removeNode

          protected final BaseExtendedVisitContext.ClientIdTrackingStrategy removeNode

      Tracking strategy that removes a node from the list of tracked subtree/shortIds

  - ### Constructor Detail

    - #### BaseExtendedVisitContext

          public BaseExtendedVisitContext(javax.faces.component.visit.VisitContext visitContextToWrap,
                                  javax.faces.context.FacesContext facesContext,
                                  Collection<String> clientIds,
                                  Set<javax.faces.component.visit.VisitHint> hints,
                                  ExtendedVisitContextMode contextMode)

      Creates a PartialVisitorContext instance with the specified hints.
      Parameters:
        `facesContext` - the FacesContext for the current request
        `clientIds` - the client ids of the components to visit
        `hints` - a the VisitHints for this visit
      Throws:
        `NullPointerException` - if `facesContext` is `null`

  - ### Method Detail

    - #### invokeVisitCallback

          public javax.faces.component.visit.VisitResult invokeVisitCallback(javax.faces.component.UIComponent component,
                                                                    javax.faces.component.visit.VisitCallback callback)

      Overrides:
        `invokeVisitCallback` in class `javax.faces.component.visit.VisitContextWrapper`
      See Also:
        `VisitContext.invokeVisitCallback()`

    - #### invokeVisitCallbackForImplicitComponent

          protected javax.faces.component.visit.VisitResult invokeVisitCallbackForImplicitComponent(javax.faces.component.UIComponent component,
                                                                                        javax.faces.component.visit.VisitCallback callback)

    - #### visitClientId

          protected void visitClientId(String clientId,
                           BaseExtendedVisitContext.ClientIdTrackingStrategy tracker)

      Use the `BaseExtendedVisitContext.ClientIdTrackingStrategy` implementations to either add or remove subtrees/shortIds collections

    - #### getIdsToVisit

          public Collection<String> getIdsToVisit()

      Overrides:
        `getIdsToVisit` in class `javax.faces.component.visit.VisitContextWrapper`
      See Also:
        `VisitContext.getIdsToVisit()`

    - #### hasImplicitSubtreeIdsToVisit

          protected boolean hasImplicitSubtreeIdsToVisit(javax.faces.component.UIComponent component)

      Return true whether this `VisitContext` allows to visit implicit IDs

    - #### getSubtreeIdsToVisit

          public Collection<String> getSubtreeIdsToVisit(javax.faces.component.UIComponent component)

      Overrides:
        `getSubtreeIdsToVisit` in class `javax.faces.component.visit.VisitContextWrapper`

    - #### getDirectSubtreeIdsToVisit

          public Collection<String> getDirectSubtreeIdsToVisit(javax.faces.component.UIComponent component)

      Specified by:
        `getDirectSubtreeIdsToVisit` in class `ExtendedVisitContext`

    - #### addDirectSubtreeIdsToVisitForImplicitComponents

          protected void addDirectSubtreeIdsToVisitForImplicitComponents(javax.faces.component.UIComponent component,
                                                             Set<String> result)

      Allows to add subtrees that contains implicit components to list IDs to visit

    - #### shouldCompleteOnEmptyIds

          protected boolean shouldCompleteOnEmptyIds()

    - #### createNamingContainerVisitContext

          public javax.faces.component.visit.VisitContext createNamingContainerVisitContext(javax.faces.component.UIComponent component,
                                                                                   Collection<String> directIds)

      Specified by:
        `createNamingContainerVisitContext` in class `ExtendedVisitContext`

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