struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From herma...@apache.org
Subject svn commit: r767529 - /struts/struts2/trunk/core/src/main/resources/template/simple/doubleselect.ftl
Date Wed, 22 Apr 2009 14:05:52 GMT
Author: hermanns
Date: Wed Apr 22 14:05:52 2009
New Revision: 767529

URL: http://svn.apache.org/viewvc?rev=767529&view=rev
Log:
WW-2809 doubleselect ignores preselection of a multiple subselect

Modified:
    struts/struts2/trunk/core/src/main/resources/template/simple/doubleselect.ftl

Modified: struts/struts2/trunk/core/src/main/resources/template/simple/doubleselect.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/simple/doubleselect.ftl?rev=767529&r1=767528&r2=767529&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/simple/doubleselect.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/simple/doubleselect.ftl Wed Apr
22 14:05:52 2009
@@ -121,13 +121,22 @@
 
         for (i = 0; i < ${parameters.id}Group[x].length; i++) {
             ${parameters.id}Temp.options[i] = new Option(${parameters.id}Group[x][i].text,
${parameters.id}Group[x][i].value);
-            <#if parameters.doubleNameValue??>
-            	if (${parameters.id}Temp.options[i].value == '${parameters.doubleNameValue}')
{
-            		${parameters.id}Temp.options[i].selected = true;
-            		selected = true;
-            	}
-            </#if>
-        }
+            <#if parameters.doubleNameValue?exists>
+                   <#if parameters.doubleMultiple?exists>
+                         for (j = 0; j < ${parameters.doubleNameValue}.length; j++) {
+                             if (${parameters.id}Temp.options[i].value == ${parameters.doubleNameValue}[j])
{
+                               ${parameters.id}Temp.options[i].selected = true;
+                                selected = true;
+                             }
+                        }
+                   <#else>
+                        if (${parameters.id}Temp.options[i].value == '${parameters.doubleNameValue}')
{
+                            ${parameters.id}Temp.options[i].selected = true;
+                            selected = true;
+                        }
+                   </#if>
+             </#if>
+         }
 
         if ((${parameters.id}Temp.options.length > 0) && (! selected)) {
            	${parameters.id}Temp.options[0].selected = true;



Mime
View raw message