Package org.jboss.seam.core

Examples of org.jboss.seam.core.Manager


      return pageflowNodeName;
   }

   public void storeConversation()
   {
      Manager manager = Manager.instance();
     
      //we only need to execute this code when we are in the
      //RENDER_RESPONSE phase, ie. not before redirects
  
      Session session = Session.getInstance();
      boolean sessionInvalid = session!=null && session.isInvalid();
      if ( !sessionInvalid && manager.isLongRunningConversation() )
      {
         storeConversation( manager.getCurrentConversationId() );
      }
      else if ( !sessionInvalid && manager.isNestedConversation() )
      {
         discardNestedConversation( manager.getParentConversationId() );
      }
      else
      {
         discardTemporaryConversation();
      }
View Full Code Here


      return selectItems;
   }
     
   private String getLongRunningConversationId()
   {
      Manager manager = Manager.instance();
      if ( manager.isLongRunningConversation() )
      {
         return manager.getCurrentConversationId();
      }
      else if ( manager.isNestedConversation() )
      {
         return manager.getParentConversationId();
      }
      else
      {
         //TODO: is there any way to set it to the current outcome, instead of null?
         return null;
View Full Code Here

    * component. This is necessary if a nested conversation is making a call to a component in
    * a parent conversation.
    */
   private String switchToConversationContextOfComponent(Component component)
   {
      Manager manager = Manager.instance();
      if (manager.isNestedConversation())
      {
         String currentCid = manager.getCurrentConversationId();
         String residentCid = manager.getCurrentConversationEntry().findPositionInConversationStack(component);
         if (!currentCid.equals(residentCid))
         {
            Contexts.getConversationContext().flush();
            Manager.instance().switchConversation(residentCid, false);
            return currentCid;
View Full Code Here

    PortletBridgeContext bridgeContext = PortletBridgeContext
            .getCurrentInstance(facesContext);
    if (null != bridgeContext) {
      BridgeRequestScope windowState = bridgeContext.getRequestScope();
      if (Contexts.isEventContextActive()) {
        Manager manager = Manager.instance();
        if (manager.isLongRunningConversation()) {
          windowState.setConversationIdParameter(manager
                  .getConversationIdParameter());
          windowState.setConversationId(manager
                  .getCurrentConversationId());
        } else {
          windowState.setConversationIdParameter(null);
          windowState.setConversationId(null);
        }
View Full Code Here

      Manager.class.getName();
   }

   public void saveConversationId(BridgeRequestScope state) {
      if (Contexts.isEventContextActive()) {
         Manager manager = Manager.instance();
         if (manager.isLongRunningConversation()) {
            state.setConversationIdParameter(manager.getConversationIdParameter());
            state.setConversationId( manager.getCurrentConversationId() );
         } else {
            state.setConversationIdParameter(null);
            state.setConversationId(null);
         }
      }
View Full Code Here

  protected Map<String, List<FacesMessage>> handleException(
          FacesContext facesContext, Exception e) throws BridgeException {
    // if the event context was cleaned up, fish the conversation id
    // directly out of the ServletRequest attributes, else get it from
    // the event context
    Manager manager = Contexts.isEventContextActive() ? (Manager) Contexts
            .getEventContext().get(Manager.class) : null;
    String conversationId = manager == null ? null : manager
            .getCurrentConversationId();

    // Initialize the temporary context objects
    FacesLifecycle
            .beginExceptionRecovery(facesContext.getExternalContext());
View Full Code Here

         }
      }

      private void updateConversationId()
      {
         Manager manager = Manager.instance();
         conversationId = manager.isLongRunningConversation() ?
                  manager.getCurrentConversationId() :
                  manager.getParentConversationId()   ;
      }
View Full Code Here

      Manager.class.getName();
   }

   public void setConversationIdParameter(PortletWindowState state) {
      if (Contexts.isEventContextActive()) {
         Manager manager = Manager.instance();
         if (manager.isLongRunningConversation()) {
            state.setConversationIdParameter(manager.getConversationIdParameter());
            state.setConversationId( manager.getCurrentConversationId() );
         } else {
            state.setConversationIdParameter(null);
            state.setConversationId(null);
         }
      }
View Full Code Here

  
   private void handleException(FacesContext facesContext, Exception e) throws BridgeException {
         //if the event context was cleaned up, fish the conversation id
         //directly out of the ServletRequest attributes, else get it from
         //the event context
         Manager manager = Contexts.isEventContextActive() ?
                 (Manager) Contexts.getEventContext().get(Manager.class) :
                 null;
         String conversationId = manager==null ? null : manager.getCurrentConversationId();

         //Initialize the temporary context objects
         FacesLifecycle.beginExceptionRecovery( facesContext.getExternalContext() );

         //If there is an existing long-running conversation on
View Full Code Here

      facesContext.setCurrent();
     
      //if the event context was cleaned up, fish the conversation id
      //directly out of the ServletRequest attributes, else get it from
      //the event context
      Manager manager = Contexts.isEventContextActive() ?
              (Manager) Contexts.getEventContext().get(Manager.class) :
              (Manager) request.getAttribute( Seam.getComponentName(Manager.class) );
      String conversationId = manager==null ? null : manager.getCurrentConversationId();
     
      //Initialize the temporary context objects
      FacesLifecycle.beginExceptionRecovery( facesContext.getExternalContext() );
     
      //If there is an existing long-running conversation on
View Full Code Here

TOP

Related Classes of org.jboss.seam.core.Manager

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.