Top Description Fields Constructors Methods
com.sun.faces.component.visit

public Class FullVisitContext

extends VisitContext
Class Inheritance
Imports
java.util.Collection, .Collections, .EnumSet, .Set, jakarta.faces.component.NamingContainer, .UIComponent, jakarta.faces.component.visit.VisitCallback, .VisitContext, .VisitHint, .VisitResult, jakarta.faces.context.FacesContext

A VisitContext implementation that is used when performing a full component tree visit.

RELEASE_PENDING
Since
2.0

Field Summary

Modifier and TypeField and Description
private final FacesContext
private final Set<VisitHint>
Inherited from jakarta.faces.component.visit.VisitContext:
ALL_IDS

Constructor Summary

AccessConstructor and Description
public
FullVisitContext(FacesContext
the FacesContext for the current request
facesContext
)

Creates a FullVisitorContext instance.

public
FullVisitContext(FacesContext
the FacesContext for the current request
facesContext
,
Set<VisitHint>
a the VisitHints for this visit
hints
)

Creates a FullVisitorContext instance with the specified hints.

Method Summary

Modifier and TypeMethod and Description
public FacesContext
getFacesContext()

Implements abstract jakarta.faces.component.visit.VisitContext.getFacesContext.

Returns the FacesContext for the current request.

public Set<VisitHint>
getHints()

Implements abstract jakarta.faces.component.visit.VisitContext.getHints.

Returns hints that influence the behavior of the tree visit.

public Collection<String>
getIdsToVisit()

Implements abstract jakarta.faces.component.visit.VisitContext.getIdsToVisit.

Returns the ids of the components to visit.

public Collection<String>
getSubtreeIdsToVisit(UIComponent
a NamingContainer component
component
)

Implements abstract jakarta.faces.component.visit.VisitContext.getSubtreeIdsToVisit.

Given a jakarta.faces.component.NamingContainer component, returns the client ids of any components underneath the NamingContainer that should be visited.

public VisitResult
invokeVisitCallback(UIComponent
the component to visit
component
,
VisitCallback
the VisitCallback to call
callback
)

Implements abstract jakarta.faces.component.visit.VisitContext.invokeVisitCallback.

Called by UIComponent.visitTree() to visit a single component.

Inherited from jakarta.faces.component.visit.VisitContext:
createVisitContextcreateVisitContext

Field Detail

facesContextback to summary
private final FacesContext facesContext
hintsback to summary
private final Set<VisitHint> hints

Constructor Detail

FullVisitContextback to summary
public FullVisitContext(FacesContext facesContext)

Creates a FullVisitorContext instance.

Parameters
facesContext:FacesContext

the FacesContext for the current request

Exceptions
NullPointerException:
if facesContext is null
FullVisitContextback to summary
public FullVisitContext(FacesContext facesContext, Set<VisitHint> hints)

Creates a FullVisitorContext instance with the specified hints.

Parameters
facesContext:FacesContext

the FacesContext for the current request

hints:Set<VisitHint>

a the VisitHints for this visit

Exceptions
NullPointerException:
if facesContext is null

Method Detail

getFacesContextback to summary
public FacesContext getFacesContext()

Implements abstract jakarta.faces.component.visit.VisitContext.getFacesContext.

Doc from jakarta.faces.component.visit.VisitContext.getFacesContext.

Returns the FacesContext for the current request.

Returns:FacesContext

the FacesContext.

Annotations
@Override
See Also
VisitContext.getFacesContext()
getHintsback to summary
public Set<VisitHint> getHints()

Implements abstract jakarta.faces.component.visit.VisitContext.getHints.

Doc from jakarta.faces.component.visit.VisitContext.getHints.

Returns hints that influence the behavior of the tree visit.

Interested parties, such as UIComponent.visitTree() implementations, may check to see whether a particular hint is present by calling VisitContext.getHints().contains(), passing in one of the hints defined by VisitHint.

Returns:Set<VisitHint>

a non-empty, unmodifiable collection of VisitHints

Annotations
@Override
See Also
VisitContext.getHints
getIdsToVisitback to summary
public Collection<String> getIdsToVisit()

Implements abstract jakarta.faces.component.visit.VisitContext.getIdsToVisit.

Doc from jakarta.faces.component.visit.VisitContext.getIdsToVisit.

Returns the ids of the components to visit.

In the case of a full tree visit, this method returns the ALL_IDS collection. Otherwise, if a partial visit is beign performed, returns a modifiable collection containing the client ids of the components that should be visited.

Returns:Collection<String>

the ids of the components to visit

Annotations
@Override
See Also
VisitContext.getIdsToVisit()
getSubtreeIdsToVisitback to summary
public Collection<String> getSubtreeIdsToVisit(UIComponent component)

Implements abstract jakarta.faces.component.visit.VisitContext.getSubtreeIdsToVisit.

Doc from jakarta.faces.component.visit.VisitContext.getSubtreeIdsToVisit.

Given a jakarta.faces.component.NamingContainer component, returns the client ids of any components underneath the NamingContainer that should be visited.

This method is called by NamingContainer visitTree() implementations to determine whether the NamingContainer contains components to be visited. In the case where no such components exist, the NamingContainer can short-circuit the tree visit and avoid descending into child subtrees.

In addition, iterating components such as UIData may be able to use the returned ids to determine which iterated states (ie. rows) need to be visited. This allows the visit traversal to be contstrained such only those rows that contain visit targets need to be traversed.

Parameters
component:UIComponent

a NamingContainer component

Returns:Collection<String>

an unmodifiable Collection containing the client ids of any components underneath the NamingContainer that are known to be targets of the tree visit. If no such components exist, returns an empty Collection. If all components underneath the NamingContainer should be visited, returns the VisitContext.ALL_IDS collection.

Annotations
@Override
See Also
VisitContext.getSubtreeIdsToVisit()
invokeVisitCallbackback to summary
public VisitResult invokeVisitCallback(UIComponent component, VisitCallback callback)

Implements abstract jakarta.faces.component.visit.VisitContext.invokeVisitCallback.

Doc from jakarta.faces.component.visit.VisitContext.invokeVisitCallback.

Called by UIComponent.visitTree() to visit a single component.

Parameters
component:UIComponent

the component to visit

callback:VisitCallback

the VisitCallback to call

Returns:VisitResult

a VisitResult value that indicates whether to continue visiting the component's subtree, skip visiting the component's subtree or abort the visit altogether.

Annotations
@Override
See Also
VisitContext.invokeVisitCallback()