Package org.apache.myfaces.trinidad.context

Examples of org.apache.myfaces.trinidad.context.ComponentContextManager


  @Override
  protected void tearDownVisitingContext(FacesContext facesContext)
  {
    super.tearDownVisitingContext(facesContext);

    ComponentContextManager ctxMgr = RequestContext.getCurrentInstance()
      .getComponentContextManager();
    Map<String, Object> reqMap = facesContext.getExternalContext().getRequestMap();
    @SuppressWarnings("unchecked")
    Queue<SuspendedContextChanges> suspendedChangesQueue = (Queue<SuspendedContextChanges>)
      reqMap.get(_SUSPENDED_CHANGES_KEY);
    SuspendedContextChanges changes = suspendedChangesQueue.poll();
    ctxMgr.resume(facesContext, changes);
  }
View Full Code Here


  @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);
    }
  }
View Full Code Here

    FacesContext    facesContext,
    String          clientId,
    ContextCallback callback
    ) throws FacesException
  {
    ComponentContextManager ctxMgr = RequestContext.getCurrentInstance()
      .getComponentContextManager();

    // Suspend any current component context during an invoke on component call for re-entrant
    // component tree processing
    SuspendedContextChanges suspendedChanges = ctxMgr.suspend(facesContext);

    try
    {
      return super.invokeOnComponent(facesContext, clientId, callback);
    }
    finally
    {
      ctxMgr.resume(facesContext, suspendedChanges);
    }
  }
View Full Code Here

  @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);
    }
  }
View Full Code Here

    FacesContext    facesContext,
    String          clientId,
    ContextCallback callback
    ) throws FacesException
  {
    ComponentContextManager ctxMgr = RequestContext.getCurrentInstance()
      .getComponentContextManager();

    // Suspend any current component context during an invoke on component call for re-entrant
    // component tree processing
    SuspendedContextChanges suspendedChanges = ctxMgr.suspend(facesContext);

    try
    {
      return super.invokeOnComponent(facesContext, clientId, callback);
    }
    finally
    {
      ctxMgr.resume(facesContext, suspendedChanges);
    }
  }
View Full Code Here

  @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);
    }
  }
View Full Code Here

    FacesContext    facesContext,
    String          clientId,
    ContextCallback callback
    ) throws FacesException
  {
    ComponentContextManager ctxMgr = RequestContext.getCurrentInstance()
      .getComponentContextManager();

    // Suspend any current component context during an invoke on component call for re-entrant
    // component tree processing
    SuspendedContextChanges suspendedChanges = ctxMgr.suspend(facesContext);

    try
    {
      return super.invokeOnComponent(facesContext, clientId, callback);
    }
    finally
    {
      ctxMgr.resume(facesContext, suspendedChanges);
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.trinidad.context.ComponentContextManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.