click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r776576 - /incubator/click/trunk/click/framework/src/org/apache/click/Page.java
Date Wed, 20 May 2009 06:17:02 GMT
Author: sabob
Date: Wed May 20 06:17:02 2009
New Revision: 776576

URL: http://svn.apache.org/viewvc?rev=776576&view=rev
Log:
render separator conditionally

Modified:
    incubator/click/trunk/click/framework/src/org/apache/click/Page.java

Modified: incubator/click/trunk/click/framework/src/org/apache/click/Page.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/framework/src/org/apache/click/Page.java?rev=776576&r1=776575&r2=776576&view=diff
==============================================================================
--- incubator/click/trunk/click/framework/src/org/apache/click/Page.java (original)
+++ incubator/click/trunk/click/framework/src/org/apache/click/Page.java Wed May 20 06:17:02
2009
@@ -1115,10 +1115,10 @@
 
     /**
      * Set the request to redirect to the given <code>location</code> and append
-     * the map of request parameter to the location URL.
+     * the map of request parameters to the location URL.
      * <p/>
      * The map keys will be used as the request parameter names and the map
-     * values will be used as the request parameter names.
+     * values will be used as the request parameter values.
      *
      * @see #setRedirect(java.lang.String)
      *
@@ -1145,10 +1145,12 @@
                 String paramName = i.next().toString();
                 Object paramValue = params.get(paramName);
                 if (paramValue != null) {
-                    buffer.append("&");
                     buffer.append(paramName);
                     buffer.append("=");
                     buffer.append(paramValue);
+                    if (i.hasNext()) {
+                        buffer.append("&");
+                    }
                 }
             }
 
@@ -1165,11 +1167,11 @@
     }
 
     /**
-     * Set the request to redirect to the give page class and and append
-     * the map of request parameter to the location URL.
+     * Set the request to redirect to the given page class and and append
+     * the map of request parameters to the page URL.
      * <p/>
      * The map keys will be used as the request parameter names and the map
-     * values will be used as the request parameter names.
+     * values will be used as the request parameter values.
      *
      * @see #setRedirect(java.lang.String)
      * @param pageClass the class of the Page to redirect the request to



Mime
View raw message