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

Gavin King gavin.king at jboss.com
Sun Dec 17 10:03:29 EST 2006


  User: gavin   
  Date: 06/12/17 10:03:29

  Modified:    src/main/org/jboss/seam/core   Conversation.java Page.java
  Log:
  fix a bug in <begin-conversation/>
  
  Revision  Changes    Path
  1.32      +15 -3     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.31
  retrieving revision 1.32
  diff -u -b -r1.31 -r1.32
  --- Conversation.java	27 Nov 2006 03:09:35 -0000	1.31
  +++ Conversation.java	17 Dec 2006 15:03:29 -0000	1.32
  @@ -194,11 +194,16 @@
         }
         else
         {
  -         Manager.instance().beginConversation( Seam.getComponentName(Conversation.class) );
  +         reallyBegin();
            return true;
         }
      }
      
  +   private void reallyBegin()
  +   {
  +      Manager.instance().beginConversation( Seam.getComponentName(Conversation.class) );
  +   }
  +   
      /**
       * Start a nested conversation.
       * 
  @@ -221,8 +226,9 @@
       * 
       * @param join if a conversation is active, should we join it?
       * @param nested if a conversation is active, should we start a new nested conversation?
  +    * @return true if a new long-running conversation was begun
       */
  -   public void begin(boolean join, boolean nested)
  +   public boolean begin(boolean join, boolean nested)
      {
         boolean longRunningConversation = Manager.instance().isLongRunningOrNestedConversation();
         if ( !join && !nested && longRunningConversation  )
  @@ -231,11 +237,17 @@
         }
         else if ( !longRunningConversation )
         {
  -         begin();
  +         reallyBegin();
  +         return true;
         }
         else if (nested)
         {
            beginNested();
  +         return true;
  +      }
  +      else
  +      {
  +         return false;
         }
      }
      
  
  
  
  1.10      +10 -7     jboss-seam/src/main/org/jboss/seam/core/Page.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Page.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/core/Page.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -b -r1.9 -r1.10
  --- Page.java	17 Dec 2006 00:25:14 -0000	1.9
  +++ Page.java	17 Dec 2006 15:03:29 -0000	1.10
  @@ -383,17 +383,20 @@
         }
         if ( isBeginConversation )
         {
  -         Conversation.instance().begin(join, nested);
  +         boolean begun = Conversation.instance().begin(join, nested);
  +         if (begun)
  +         {
            if (flushMode!=null)
            {
               Conversation.instance().changeFlushMode(flushMode);
            }
  -         if (pageflow!=null)
  +            if ( pageflow!=null  )
            {
               Pageflow.instance().begin(pageflow);
            }
         }
      }
  +   }
   
      public FlushModeType getFlushMode()
      {
  
  
  



More information about the jboss-cvs-commits mailing list