Package org.jboss.seam.core

Examples of org.jboss.seam.core.Conversation


    * Called just before the render phase.
    */
   public void prepareBackswitch(FacesContext facesContext)
   {
     
      Conversation conversation = Conversation.instance();

      //stuff from jPDL takes precedence
      org.jboss.seam.pageflow.Page page =
            Manager.instance().isLongRunningConversation() &&
            Init.instance().isJbpmInstalled() &&
            Pageflow.instance().isInProcess() && Pageflow.instance().isStarted() ?
                  Pageflow.instance().getPage() : null;
     
      if (page==null)
      {
         //handle stuff defined in pages.xml
         Pages pages = Pages.instance();
         if (pages!=null) //for tests
         {
            String viewId = Pages.getViewId(facesContext);
            org.jboss.seam.navigation.Page pageEntry = pages.getPage(viewId);
            if ( pageEntry.isSwitchEnabled() )
            {
               conversation.setViewId(viewId);
            }
            if ( pageEntry.hasDescription() )
            {
               conversation.setDescription( pageEntry.renderDescription() );
            }
            else if(pages.hasDescription(viewId))
            {
               conversation.setDescription( pages.renderDescription(viewId) )
            }
            conversation.setTimeout( pages.getTimeout(viewId) );
            conversation.setConcurrentRequestTimeout( pages.getConcurrentRequestTimeout(viewId) );
         }
      }
      else
      {
         //use stuff from the pageflow definition
         if ( page.isSwitchEnabled() )
         {
            conversation.setViewId( Pageflow.instance().getPageViewId() );
         }
         if ( page.hasDescription() )
         {
            conversation.setDescription( page.getDescription() );
         }
         conversation.setTimeout( page.getTimeout() );
      }
     
      flushConversationMetadata();

   }
View Full Code Here


  private static final String COMPONENT_TYPE = "org.jboss.seam.ui.ConversationId";  
  
   @Override
   public String getName()
   {
      Conversation conversation = Conversation.instance();
      if (getViewId()!=null && ( !conversation.isNested() || conversation.isLongRunning() ) )
      {
         return Pages.instance().getPage(getViewId())
                     .getConversationIdParameter()
                     .getParameterName();
      }
View Full Code Here

   }
  
   @Override
   public Object getValue()
   {
      Conversation conversation = Conversation.instance();
      if ( !conversation.isNested() || conversation.isLongRunning() )
      {
         if (getViewId()!=null)
         {
            Page page = Pages.instance().getPage(getViewId());
            return page.getConversationIdParameter().getParameterValue();
         }
         else
         {
            return conversation.getId();
         }
      }
      else
      {
         return conversation.getParentId();
      }
   }
View Full Code Here

    * Called just before the render phase.
    */
   public void prepareBackswitch(FacesContext facesContext)
   {
     
      Conversation conversation = Conversation.instance();

      //stuff from jPDL takes precedence
      org.jboss.seam.pageflow.Page page =
            Manager.instance().isLongRunningConversation() &&
            Init.instance().isJbpmInstalled() &&
            Pageflow.instance().isInProcess() && Pageflow.instance().isStarted() ?
                  Pageflow.instance().getPage() : null;
     
      if (page==null)
      {
         //handle stuff defined in pages.xml
         Pages pages = Pages.instance();
         if (pages!=null) //for tests
         {
            String viewId = Pages.getViewId(facesContext);
            org.jboss.seam.navigation.Page pageEntry = pages.getPage(viewId);
            if ( pageEntry.isSwitchEnabled() )
            {
               conversation.setViewId(viewId);
            }
            if ( pageEntry.hasDescription() )
            {
               conversation.setDescription( pageEntry.renderDescription() );
            }
            else if(pages.hasDescription(viewId))
            {
               conversation.setDescription( pages.renderDescription(viewId) )
            }
            conversation.setTimeout( pages.getTimeout(viewId) );
            conversation.setConcurrentRequestTimeout( pages.getConcurrentRequestTimeout(viewId) );
         }
      }
      else
      {
         //use stuff from the pageflow definition
         if ( page.isSwitchEnabled() )
         {
            conversation.setViewId( Pageflow.instance().getPageViewId() );
         }
         if ( page.hasDescription() )
         {
            conversation.setDescription( page.getDescription() );
         }
         conversation.setTimeout( page.getTimeout() );
      }
     
      flushConversationMetadata();

   }
View Full Code Here

    * Called just before the render phase.
    */
   public void prepareBackswitch(FacesContext facesContext)
   {
     
      Conversation conversation = Conversation.instance();

      //stuff from jPDL takes precedence
      org.jboss.seam.pageflow.Page page =
            Manager.instance().isLongRunningConversation() &&
            Init.instance().isJbpmInstalled() &&
            Pageflow.instance().isInProcess() ?
                  Pageflow.instance().getPage() : null;
     
      if (page==null)
      {
         //handle stuff defined in pages.xml
         Pages pages = Pages.instance();
         if (pages!=null) //for tests
         {
            String viewId = Pages.getViewId(facesContext);
            org.jboss.seam.navigation.Page pageEntry = pages.getPage(viewId);
            if ( pageEntry.isSwitchEnabled() )
            {
               conversation.setViewId(viewId);
            }
            if ( pageEntry.hasDescription() )
            {
               conversation.setDescription( pageEntry.renderDescription() );
            }
            conversation.setTimeout( pages.getTimeout(viewId) );
         }
      }
      else
      {
         //use stuff from the pageflow definition
         if ( page.isSwitchEnabled() )
         {
            conversation.setViewId( Pageflow.instance().getPageViewId() );
         }
         if ( page.hasDescription() )
         {
            conversation.setDescription( page.getDescription() );
         }
         conversation.setTimeout( page.getTimeout() );
      }
     
      flushConversationMetadata();

   }
View Full Code Here

    * Called just before the render phase.
    */
   public void prepareBackswitch(FacesContext facesContext)
   {
     
      Conversation conversation = Conversation.instance();

      //stuff from jPDL takes precedence
      org.jboss.seam.pageflow.Page page =
            Manager.instance().isLongRunningConversation() &&
            Init.instance().isJbpmInstalled() &&
            Pageflow.instance().isInProcess() ?
                  Pageflow.instance().getPage() : null;
     
      if (page==null)
      {
         //handle stuff defined in pages.xml
         Pages pages = Pages.instance();
         if (pages!=null) //for tests
         {
            String viewId = Pages.getViewId(facesContext);
            org.jboss.seam.navigation.Page pageEntry = pages.getPage(viewId);
            if ( pageEntry.isSwitchEnabled() )
            {
               conversation.setViewId(viewId);
            }
            if ( pageEntry.hasDescription() )
            {
               conversation.setDescription( pageEntry.renderDescription() );
            }
            conversation.setTimeout( pages.getTimeout(viewId) );
         }
      }
      else
      {
         //use stuff from the pageflow definition
         if ( page.isSwitchEnabled() )
         {
            conversation.setViewId( Pageflow.instance().getPageViewId() );
         }
         if ( page.hasDescription() )
         {
            conversation.setDescription( page.getDescription() );
         }
         conversation.setTimeout( page.getTimeout() );
      }
     
      flushConversationMetadata();

   }
View Full Code Here

   public static final String COMPONENT_TYPE = "org.jboss.seam.ui.UIConversationId";
  
   @Override
   public String getName()
   {
      Conversation conversation = Conversation.instance();
      if (viewId!=null && ( !conversation.isNested() || conversation.isLongRunning() ) )
      {
         return Pages.instance().getPage(viewId)
                     .getConversationIdParameter()
                     .getParameterName();
      }
View Full Code Here

   }
  
   @Override
   public Object getValue()
   {
      Conversation conversation = Conversation.instance();
      if ( !conversation.isNested() || conversation.isLongRunning() )
      {
         if (viewId!=null)
         {
            Page page = Pages.instance().getPage(viewId);
            return page.getConversationIdParameter().getParameterValue();
         }
         else
         {
            return conversation.getId();
         }
      }
      else
      {
         return conversation.getParentId();
      }
   }
View Full Code Here

    * Called just before the render phase.
    */
   public void prepareBackswitch(FacesContext facesContext)
   {
     
      Conversation conversation = Conversation.instance();

      //stuff from jPDL takes precedence
      org.jboss.seam.pageflow.Page page =
            Manager.instance().isLongRunningConversation() &&
            Init.instance().isJbpmInstalled() &&
            Pageflow.instance().isInProcess() ?
                  Pageflow.instance().getPage() : null;
     
      if (page==null)
      {
         //handle stuff defined in pages.xml
         Pages pages = Pages.instance();
         if (pages!=null) //for tests
         {
            String viewId = Pages.getViewId(facesContext);
            org.jboss.seam.navigation.Page pageEntry = pages.getPage(viewId);
            if ( pageEntry.isSwitchEnabled() )
            {
               conversation.setViewId(viewId);
            }
            if ( pageEntry.hasDescription() )
            {
               conversation.setDescription( pageEntry.renderDescription() );
            }
            conversation.setTimeout( pages.getTimeout(viewId) );
         }
      }
      else
      {
         //use stuff from the pageflow definition
         if ( page.isSwitchEnabled() )
         {
            conversation.setViewId( Pageflow.instance().getPageViewId() );
         }
         if ( page.hasDescription() )
         {
            conversation.setDescription( page.getDescription() );
         }
         conversation.setTimeout( page.getTimeout() );
      }
     
      flushConversationMetadata();

   }
View Full Code Here

TOP

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

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.