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

Gavin King gavin.king at jboss.com
Sun Nov 26 22:09:35 EST 2006


  User: gavin   
  Date: 06/11/26 22:09:35

  Modified:    src/main/org/jboss/seam/core    Conversation.java
                        Manager.java Pages.java
  Log:
  support timeout on wildcard view ids
  
  Revision  Changes    Path
  1.31      +1 -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.30
  retrieving revision 1.31
  diff -u -b -r1.30 -r1.31
  --- Conversation.java	24 Nov 2006 23:15:17 -0000	1.30
  +++ Conversation.java	27 Nov 2006 03:09:35 -0000	1.31
  @@ -35,7 +35,7 @@
      String viewId;
   
      /**
  -    * Get the timeout for this converstaion instance.
  +    * Get the timeout for this conversation instance.
       * @return the timeout in millis
       */
      public Integer getTimeout() {
  
  
  
  1.123     +2 -2      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.122
  retrieving revision 1.123
  diff -u -b -r1.122 -r1.123
  --- Manager.java	27 Nov 2006 03:00:15 -0000	1.122
  +++ Manager.java	27 Nov 2006 03:09:35 -0000	1.123
  @@ -42,7 +42,7 @@
    *
    * @author Gavin King
    * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
  - * @version $Revision: 1.122 $
  + * @version $Revision: 1.123 $
    */
   @Scope(ScopeType.EVENT)
   @Name("org.jboss.seam.core.manager")
  @@ -996,7 +996,7 @@
               {
                  conversation.setDescription( pageEntry.renderDescription() );
               }
  -            conversation.setTimeout( pageEntry.getTimeout() );
  +            conversation.setTimeout( Pages.instance().getTimeout(viewId) );
            }
         }
         else
  
  
  
  1.55      +20 -0     jboss-seam/src/main/org/jboss/seam/core/Pages.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Pages.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/core/Pages.java,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -b -r1.54 -r1.55
  --- Pages.java	27 Nov 2006 03:00:15 -0000	1.54
  +++ Pages.java	27 Nov 2006 03:09:35 -0000	1.55
  @@ -581,6 +581,26 @@
         return this.noConversationViewId;
      }
   
  +   /**
  +    * Search for a defined conversation timeout, beginning with
  +    * the most specific view id, then wildcarded view ids, and 
  +    * finally the global setting from Manager
  +    */
  +   public Integer getTimeout(String viewId)
  +   {
  +      List<Page> stack = getPageStack(viewId);
  +      for (int i=stack.size()-1; i>=0; i++)
  +      {
  +         Page page = stack.get(i);
  +         Integer timeout = page.getTimeout();
  +         if (timeout!=null)
  +         {
  +            return timeout;
  +         }
  +      }
  +      return Manager.instance().getConversationTimeout();
  +   }
  +
      public static String getSuffix()
      {
         String defaultSuffix = FacesContext.getCurrentInstance().getExternalContext()
  
  
  



More information about the jboss-cvs-commits mailing list