click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r959292 - /click/trunk/click/examples/src/org/apache/click/examples/page/wizard/SelectPostCode.java
Date Wed, 30 Jun 2010 12:46:18 GMT
Author: sabob
Date: Wed Jun 30 12:46:17 2010
New Revision: 959292

URL: http://svn.apache.org/viewvc?rev=959292&view=rev
Log:
removed dependency on getParameters

Modified:
    click/trunk/click/examples/src/org/apache/click/examples/page/wizard/SelectPostCode.java

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/wizard/SelectPostCode.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/wizard/SelectPostCode.java?rev=959292&r1=959291&r2=959292&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/wizard/SelectPostCode.java
(original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/wizard/SelectPostCode.java
Wed Jun 30 12:46:17 2010
@@ -69,14 +69,16 @@ public class SelectPostCode extends Bord
              * Override default implementation to send parameters
              * address.postCode and address.state to the WizardPage.
              */
+            @Override
             protected void renderActionLink(HtmlStringBuffer buffer,
                 AbstractLink link, Context context, Object row, Object value) {
                 // Remove the default parameter name set for the value
-                String idPropertyValue = (String) link.getParameters().remove(idProperty);
+                link.setParameter(idProperty, null);
 
+                PostCode postCode = (PostCode) row;
                 // Add extra parameters for each row to the rendered action link
-                link.setParameter("address.postCode", idPropertyValue);
-                link.setParameter("address.state", ((PostCode) row).getState());
+                link.setParameter("address.postCode", postCode.getPostCode());
+                link.setParameter("address.state", postCode.getState());
                 super.renderActionLink(buffer, link, context, row, value);
             }
         };



Mime
View raw message