click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r965030 - in /click/trunk/click: extras/src/org/apache/click/extras/control/CheckList.java extras/src/org/apache/click/extras/control/PickList.java framework/src/org/apache/click/control/Select.java
Date Sat, 17 Jul 2010 08:22:27 GMT
Author: sabob
Date: Sat Jul 17 08:22:27 2010
New Revision: 965030

URL: http://svn.apache.org/viewvc?rev=965030&view=rev
Log:
cleanup

Modified:
    click/trunk/click/extras/src/org/apache/click/extras/control/CheckList.java
    click/trunk/click/extras/src/org/apache/click/extras/control/PickList.java
    click/trunk/click/framework/src/org/apache/click/control/Select.java

Modified: click/trunk/click/extras/src/org/apache/click/extras/control/CheckList.java
URL: http://svn.apache.org/viewvc/click/trunk/click/extras/src/org/apache/click/extras/control/CheckList.java?rev=965030&r1=965029&r2=965030&view=diff
==============================================================================
--- click/trunk/click/extras/src/org/apache/click/extras/control/CheckList.java (original)
+++ click/trunk/click/extras/src/org/apache/click/extras/control/CheckList.java Sat Jul 17
08:22:27 2010
@@ -926,29 +926,30 @@ public class CheckList extends Field {
         }
 
         // Load the selected items.
-        this.selectedValues = new ArrayList<String>();
+        List<String> localSelectedValues = new ArrayList<String>();
 
-        String[] values = context.getRequestParameterValues(getName());
+        String[] parameterValues = context.getRequestParameterValues(getName());
 
-        if (values != null) {
-            for (String value1 : values) {
-                this.selectedValues.add(value1);
+        if (parameterValues != null) {
+            for (String parameterValue : parameterValues) {
+                localSelectedValues.add(parameterValue);
             }
         }
 
         if (isSortable()) {
-            String[] order = context.getRequest().getParameterValues(
+            String[] orderParameterValues = context.getRequest().getParameterValues(
                     getName() + "_order");
-            if (order != null) {
-                this.sortorder = new ArrayList<String>(order.length);
-                for (String value : order) {
-                    if (value != null) {
-                        sortorder.add(value);
+            if (orderParameterValues != null) {
+                this.sortorder = new ArrayList<String>(orderParameterValues.length);
+                for (String orderParameterValue : orderParameterValues) {
+                    if (orderParameterValue != null) {
+                        sortorder.add(orderParameterValue);
                     }
                 }
-                sortOptions(order);
+                sortOptions(orderParameterValues);
             }
         }
+        setSelectedValues(localSelectedValues);
     }
 
     /**
@@ -963,12 +964,12 @@ public class CheckList extends Field {
         final List<Option> orderList = new ArrayList<Option>(options.size());
 
         for (int i = 0, size = order.length; i < size; i++) {
-            String value = order[i];
-            if (value != null) {
+            String orderValue = order[i];
+            if (orderValue != null) {
                 int oI = -1;
                 for (int j = 0, jSize = options.size(); j < jSize; j++) {
                     Option optT = options.get(j);
-                    if (value.equals(optT.getValue())) {
+                    if (orderValue.equals(optT.getValue())) {
                         oI = j;
                     }
                 }

Modified: click/trunk/click/extras/src/org/apache/click/extras/control/PickList.java
URL: http://svn.apache.org/viewvc/click/trunk/click/extras/src/org/apache/click/extras/control/PickList.java?rev=965030&r1=965029&r2=965030&view=diff
==============================================================================
--- click/trunk/click/extras/src/org/apache/click/extras/control/PickList.java (original)
+++ click/trunk/click/extras/src/org/apache/click/extras/control/PickList.java Sat Jul 17
08:22:27 2010
@@ -773,7 +773,7 @@ public class PickList extends Field {
     public void bindRequestValue() {
 
         // Load the selected items.
-        List localSelectedValues = new ArrayList<String>();
+        List<String> localSelectedValues = new ArrayList<String>();
 
         String[] parameterValues =
             getContext().getRequest().getParameterValues(getName());

Modified: click/trunk/click/framework/src/org/apache/click/control/Select.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/control/Select.java?rev=965030&r1=965029&r2=965030&view=diff
==============================================================================
--- click/trunk/click/framework/src/org/apache/click/control/Select.java (original)
+++ click/trunk/click/framework/src/org/apache/click/control/Select.java Sat Jul 17 08:22:27
2010
@@ -905,7 +905,7 @@ public class Select extends Field {
     @Override
     public void bindRequestValue() {
 
-        List localSelectedValues = new ArrayList<String>(5);
+        List<String> localSelectedValues = new ArrayList<String>(5);
 
         // Process single item select case.
         if (!isMultiple()) {



Mime
View raw message