public class PartialVisitContext
extends javax.faces.component.visit.VisitContext
A VisitContext implementation that is used when performing a partial component tree visit.
RELEASE_PENDING| Constructor and Description |
|---|
PartialVisitContext(javax.faces.context.FacesContext facesContext,
Collection<String> clientIds)
Creates a PartialVisitorContext instance.
|
PartialVisitContext(javax.faces.context.FacesContext facesContext,
Collection<String> clientIds,
Set<javax.faces.component.visit.VisitHint> hints)
Creates a PartialVisitorContext instance with the specified hints.
|
| Modifier and Type | Method and Description |
|---|---|
javax.faces.context.FacesContext |
getFacesContext()
Returns the FacesContext for the current request. |
Set<javax.faces.component.visit.VisitHint> |
getHints()
Returns hints that influence the behavior of the tree visit.
|
Collection<String> |
getIdsToVisit()
Returns the ids of the components to visit. |
Collection<String> |
getSubtreeIdsToVisit(javax.faces.component.UIComponent component)
Given a |
Collection<String> |
getUnvisitedClientIds() |
javax.faces.component.visit.VisitResult |
invokeVisitCallback(javax.faces.component.UIComponent component,
javax.faces.component.visit.VisitCallback callback)
Called by
UIComponent.visitTree()
to visit a single component. |
public PartialVisitContext(javax.faces.context.FacesContext facesContext,
Collection<String> clientIds)
facesContext - the FacesContext for the current requestclientIds - the client ids of the components to visitNullPointerException - if facesContext
is nullpublic PartialVisitContext(javax.faces.context.FacesContext facesContext,
Collection<String> clientIds,
Set<javax.faces.component.visit.VisitHint> hints)
facesContext - the FacesContext for the current requestclientIds - the client ids of the components to visithints - a the VisitHints for this visitNullPointerException - if facesContext
is nullpublic javax.faces.context.FacesContext getFacesContext()
javax.faces.component.visit.VisitContextReturns the FacesContext for the current request.
getFacesContext in class javax.faces.component.visit.VisitContextVisitContext.getFacesContext()public Set<javax.faces.component.visit.VisitHint> getHints()
javax.faces.component.visit.VisitContextReturns 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.
getHints in class javax.faces.component.visit.VisitContextVisitContext.getHintspublic Collection<String> getIdsToVisit()
javax.faces.component.visit.VisitContextReturns 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.
getIdsToVisit in class javax.faces.component.visit.VisitContextVisitContext.getIdsToVisit()public Collection<String> getUnvisitedClientIds()
public Collection<String> getSubtreeIdsToVisit(javax.faces.component.UIComponent component)
javax.faces.component.visit.VisitContext Given a 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.
getSubtreeIdsToVisit in class javax.faces.component.visit.VisitContextcomponent - a NamingContainer componentVisitContext.ALL_IDS collection.VisitContext.getSubtreeIdsToVisit()public javax.faces.component.visit.VisitResult invokeVisitCallback(javax.faces.component.UIComponent component,
javax.faces.component.visit.VisitCallback callback)
javax.faces.component.visit.VisitContextCalled by UIComponent.visitTree()
to visit a single component.
invokeVisitCallback in class javax.faces.component.visit.VisitContextcomponent - the component to visitcallback - the VisitCallback to callVisitContext.invokeVisitCallback()Copyright © 2010–2020 JBoss by Red Hat. All rights reserved.