You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Kurt Grafius <ku...@jvoom.com> on 2001/06/13 02:52:02 UTC

[Patch] SelectorBox.java

The patch below properly initializes the Option object using the value
rather than the name.

Index: SelectorBox.java
===================================================================
RCS file:
/repository/tools/jakarta-turbine/src/java/org/apache/turbine/util/template/
SelectorBox.java,v
retrieving revision 1.1.1.1
diff -B -b -u -r1.1.1.1 SelectorBox.java
--- SelectorBox.java 2001/06/12 18:57:32 1.1.1.1
+++ SelectorBox.java 2001/06/12 21:58:15
@@ -241,8 +241,8 @@
         sel.setName(name);
         for (int f=0;f<values.length;f++)
         {
-            Option opt = new Option((String)names[f]);
-            opt.addElement((String)values[f]);
+            Option opt = new Option((String)values[f]);
+            opt.addElement((String)names[f]);
             if ( selected != null && selected[f] == true )
             {
                 opt.setSelected(true);


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org