click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r978827 - /click/trunk/click/extras/src/org/apache/click/extras/control/SubmitLink.java
Date Sat, 24 Jul 2010 08:39:44 GMT
Author: sabob
Date: Sat Jul 24 08:39:43 2010
New Revision: 978827

URL: http://svn.apache.org/viewvc?rev=978827&view=rev
Log:
without stateful pages we can revert CLK-685

Modified:
    click/trunk/click/extras/src/org/apache/click/extras/control/SubmitLink.java

Modified: click/trunk/click/extras/src/org/apache/click/extras/control/SubmitLink.java
URL: http://svn.apache.org/viewvc/click/trunk/click/extras/src/org/apache/click/extras/control/SubmitLink.java?rev=978827&r1=978826&r2=978827&view=diff
==============================================================================
--- click/trunk/click/extras/src/org/apache/click/extras/control/SubmitLink.java (original)
+++ click/trunk/click/extras/src/org/apache/click/extras/control/SubmitLink.java Sat Jul 24
08:39:43 2010
@@ -271,9 +271,6 @@ public class SubmitLink extends ActionLi
     /**
      * Set the parameter prefix that is applied to the SubmitLink parameters.
      *
-     * @deprecated the link request parameter binding will be removed in a future
-     * release, thus removing the need for parameter prefixing
-     *
      * @param prefix the parameter prefix
      */
     public void setParameterPrefix(String prefix) {
@@ -283,9 +280,6 @@ public class SubmitLink extends ActionLi
     /**
      * Return the parameter prefix that is applied to the SubmitLink parameters.
      *
-     * @deprecated the link request parameter binding will be removed in a future
-     * release, thus removing the need for parameter prefixing
-     *
      * @return the parameter prefix that is applied to the SubmitLink parameters.
      */
     public String getParameterPrefix() {
@@ -383,17 +377,17 @@ public class SubmitLink extends ActionLi
         if (hasParameters()) {
             Iterator i = getParameters().keySet().iterator();
             while (i.hasNext()) {
-                String name = i.next().toString();
-                if (!name.equals(ACTION_LINK) && !name.equals(VALUE)) {
-                    Object paramValue = getParameters().get(name);
+                String localName = i.next().toString();
+                if (!localName.equals(ACTION_LINK) && !localName.equals(VALUE)) {
+                    Object paramValue = getParameters().get(localName);
                     if (paramValue instanceof String[]) {
                         String[] paramValues = (String[]) paramValue;
                         for (int j = 0; j < paramValues.length; j++) {
-                            renderParameter(name, paramValues[j], prefix,
+                            renderParameter(localName, paramValues[j], prefix,
                                 buffer, context);
                         }
                     } else {
-                        renderParameter(name, paramValue, prefix, buffer,
+                        renderParameter(localName, paramValue, prefix, buffer,
                             context);
                     }
                 }
@@ -417,16 +411,6 @@ public class SubmitLink extends ActionLi
             // SubmitLink parameters are prefixed when included inside a Form
             String prefix = getParameterPrefix();
 
-            // TODO: create a VALUE for SubmitLink with a static prefix in order
-            // to obscure the parameter from Form fields
-            /*
-            String value = context.getRequestParameter(prefix + VALUE);
-            if (value != null) {
-                setValue(value);
-            }*/
-
-            // TODO refactor link not to bind parameters since it can lead to
-            // memory leaks, especially when using Ajax. Remove the code below
             HttpServletRequest request = context.getRequest();
             Set<String> parameterNames = request.getParameterMap().keySet();
 



Mime
View raw message