@Override
public boolean visitTree(
VisitContext visitContext,
VisitCallback callback)
{
ComponentContextManager ctxMgr = RequestContext.getCurrentInstance()
.getComponentContextManager();
FacesContext facesContext = visitContext.getFacesContext();
// Suspend any current component context during a visit tree for re-entrant
// component tree processing
SuspendedContextChanges suspendedChanges = ctxMgr.suspend(facesContext);
try
{
return super.visitTree(visitContext, callback);
}
finally
{
ctxMgr.resume(facesContext, suspendedChanges);
}
}