[jboss-cvs] jboss-seam/src/main/org/jboss/seam/core ...

Gavin King gavin.king at jboss.com
Wed Jul 12 16:44:59 EDT 2006


  User: gavin   
  Date: 06/07/12 16:44:59

  Modified:    src/main/org/jboss/seam/core    Manager.java
                        ConversationEntry.java Conversation.java
  Log:
  added beforeRedirect to @End
  
  Revision  Changes    Path
  1.78      +15 -9     jboss-seam/src/main/org/jboss/seam/core/Manager.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Manager.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/core/Manager.java,v
  retrieving revision 1.77
  retrieving revision 1.78
  diff -u -b -r1.77 -r1.78
  --- Manager.java	12 Jul 2006 19:59:59 -0000	1.77
  +++ Manager.java	12 Jul 2006 20:44:59 -0000	1.78
  @@ -44,7 +44,7 @@
    *
    * @author Gavin King
    * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
  - * @version $Revision: 1.77 $
  + * @version $Revision: 1.78 $
    */
   @Scope(ScopeType.EVENT)
   @Name("org.jboss.seam.core.manager")
  @@ -79,6 +79,8 @@
   
      private boolean controllingRedirect;
      
  +   private boolean destroyBeforeRedirect;
  +   
      private int conversationTimeout = 600000; //10 mins
      
      private String conversationIdParameter = "conversationId";
  @@ -594,7 +596,7 @@
         }
         else if ( "end".equals(propagation) )
         {
  -         endConversation();
  +         endConversation(false);
         }
   
      }
  @@ -711,9 +713,10 @@
      /**
       * Make a long-running conversation temporary.
       */
  -   public void endConversation()
  +   public void endConversation(boolean beforeRedirect)
      {
         setLongRunningConversation(false);
  +      destroyBeforeRedirect = beforeRedirect;
      }
      
      /**
  @@ -784,6 +787,8 @@
       */
      public void beforeRedirect()
      {
  +      if (!destroyBeforeRedirect)
  +      {
         ConversationEntry ce = getConversationEntry(currentConversationId);
         if (ce==null)
         {
  @@ -793,6 +798,7 @@
         ce.setRemoveAfterRedirect( !isLongRunningConversation() );
         setLongRunningConversation(true);
      }
  +   }
   
      private String encodeConversationId(String url) {
         if ( Seam.isSessionInvalid() )
  
  
  
  1.16      +1 -1      jboss-seam/src/main/org/jboss/seam/core/ConversationEntry.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ConversationEntry.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/core/ConversationEntry.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -b -r1.15 -r1.16
  --- ConversationEntry.java	18 Jun 2006 00:19:41 -0000	1.15
  +++ ConversationEntry.java	12 Jul 2006 20:44:59 -0000	1.16
  @@ -77,7 +77,7 @@
   
      public String destroy() {
         boolean success = Manager.instance().swapConversation( getId() );
  -      if (success) Manager.instance().endConversation();
  +      if (success) Manager.instance().endConversation(false);
         return null;
      }
   
  
  
  
  1.19      +10 -1     jboss-seam/src/main/org/jboss/seam/core/Conversation.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Conversation.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/core/Conversation.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -b -r1.18 -r1.19
  --- Conversation.java	30 Jun 2006 18:54:03 -0000	1.18
  +++ Conversation.java	12 Jul 2006 20:44:59 -0000	1.19
  @@ -192,7 +192,16 @@
       */
      public void end()
      {
  -      Manager.instance().endConversation();   
  +      Manager.instance().endConversation(false);   
  +   }
  +   
  +   /**
  +    * End a long-runnning conversation and destroy
  +    * it before a redirect.
  +    */
  +   public void endBeforeRedirect()
  +   {
  +      Manager.instance().endConversation(true);   
      }
      
      /**
  
  
  



More information about the jboss-cvs-commits mailing list