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

Gavin King gavin.king at jboss.com
Mon Mar 26 13:53:57 EDT 2007


  User: gavin   
  Date: 07/03/26 13:53:57

  Modified:    src/main/org/jboss/seam/core  Manager.java
  Log:
  fix two bugs
  
  Revision  Changes    Path
  1.160     +21 -6     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.159
  retrieving revision 1.160
  diff -u -b -r1.159 -r1.160
  --- Manager.java	9 Mar 2007 02:14:15 -0000	1.159
  +++ Manager.java	26 Mar 2007 17:53:57 -0000	1.160
  @@ -45,7 +45,7 @@
    *
    * @author Gavin King
    * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
  - * @version $Revision: 1.159 $
  + * @version $Revision: 1.160 $
    */
   @Scope(ScopeType.EVENT)
   @Name("org.jboss.seam.core.manager")
  @@ -871,13 +871,28 @@
   
      /**
       * Add the conversation id to a URL, if necessary
  +    * 
  +    * @deprecated use encodeConversationId(String url, String viewId)
       */
  -   public String encodeConversationId(String url, String viewId) 
  +   public String encodeConversationId(String url)
      {
  -      Page page = Pages.instance().getPage(viewId);
  -      String paramName = page.getConversationIdParameter().getParameterName();
  +      //DONT BREAK, icefaces uses this
  +      return encodeConversationIdParameter( url, getConversationIdParameter(), getCurrentConversationId() );
  +   }
         
  +   /**
  +    * Add the conversation id to a URL, if necessary
  +    */
  +   public String encodeConversationId(String url, String viewId) 
  +   {
         //DONT BREAK, icefaces uses this
  +      ConversationIdParameter cip = Pages.instance().getPage(viewId).getConversationIdParameter();
  +      return encodeConversationIdParameter( url, cip.getParameterName(), cip.getParameterValue() );
  +   }
  + 
  +   private String encodeConversationIdParameter(String url, String paramName, String paramValue)
  +   {
  +         
         if ( Seam.isSessionInvalid() || containsParameter(url, paramName) )
         {
            return url;
  @@ -909,7 +924,7 @@
                  .append( url.contains("?") ? '&' : '?' )
                  .append(paramName)
                  .append('=')
  -               .append( encode( page.getConversationIdParameter().getParameterValue() ) );
  +               .append( encode(paramValue) );
            if ( isNestedConversation() && !isReallyLongRunningConversation() )
            {
               builder.append('&')
  
  
  



More information about the jboss-cvs-commits mailing list