You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by mu...@apache.org on 2009/08/14 05:16:44 UTC
svn commit: r804072 - in /struts/struts2/trunk/core/src:
main/java/org/apache/struts2/interceptor/ main/resources/
main/resources/template/simple/ test/java/org/apache/struts2/interceptor/
test/resources/org/apache/struts2/views/jsp/ui/
Author: musachy
Date: Fri Aug 14 03:16:35 2009
New Revision: 804072
URL: http://svn.apache.org/viewvc?rev=804072&view=rev
Log:
WW-2802 Unselected multi-select boxes do not post back request parameters, therefore the associated attributes do not get cleared
thanks to Tim Stavenger for the patch
Added:
struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/MultiselectInterceptor.java
struts/struts2/trunk/core/src/test/java/org/apache/struts2/interceptor/MultiselectInterceptorTest.java
Modified:
struts/struts2/trunk/core/src/main/resources/struts-default.xml
struts/struts2/trunk/core/src/main/resources/template/simple/checkboxlist.ftl
struts/struts2/trunk/core/src/main/resources/template/simple/doubleselect.ftl
struts/struts2/trunk/core/src/main/resources/template/simple/optiontransferselect.ftl
struts/struts2/trunk/core/src/main/resources/template/simple/select.ftl
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/CheckboxList-1.txt
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/CheckboxList-2.txt
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/CheckboxList-3.txt
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/CheckboxList-4.txt
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-11.txt
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-2.txt
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-22.txt
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-24.txt
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-6.txt
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/OptGroup-3.txt
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Select-10.txt
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Select-12.txt
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Select-2.txt
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Select-3.txt
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Select-5.txt
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/inputtransferselect-1.txt
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-1.txt
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-2.txt
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-3.txt
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-4.txt
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-5.txt
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-6.txt
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-7.txt
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-1.txt
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-10.txt
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-11.txt
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-2.txt
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-3.txt
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-4.txt
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-5.txt
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-6.txt
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-7.txt
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-8.txt
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-9.txt
Added: struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/MultiselectInterceptor.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/MultiselectInterceptor.java?rev=804072&view=auto
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/MultiselectInterceptor.java (added)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/MultiselectInterceptor.java Fri Aug 14 03:16:35 2009
@@ -0,0 +1,77 @@
+/*
+ * $Id: BackgroundProcess.java 651946 2008-04-27 13:41:38Z apetrelli $
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.struts2.interceptor;
+
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+import com.opensymphony.xwork2.ActionInvocation;
+import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
+
+
+/**
+ * Just as the CheckboxInterceptor checks that if only the hidden field is present, so too does this interceptor. If
+ * the "__multiselect_" request parameter is present and its visible counterpart is not, set a new request parameter to an
+ * empty Sting.
+ */
+public class MultiselectInterceptor extends AbstractInterceptor {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Just as the CheckboxInterceptor checks that if only the hidden field is present, so too does this interceptor.
+ * If the "__multiselect_" request parameter is present and its visible counterpart is not, set a new request parameter
+ * to an empty Sting.
+ *
+ * @param actionInvocation ActionInvocation
+ * @return the result of the action
+ * @throws Exception if error
+ * @see com.opensymphony.xwork2.interceptor.Interceptor#intercept(com.opensymphony.xwork2.ActionInvocation)
+ */
+ public String intercept(ActionInvocation actionInvocation) throws Exception {
+ Map parameters = actionInvocation.getInvocationContext().getParameters();
+ Map<String, Object> newParams = new HashMap<String, Object>();
+ Set<String> keys = parameters.keySet();
+
+ for (Iterator<String> iterator = keys.iterator(); iterator.hasNext();) {
+ String key = iterator.next();
+
+ if (key.startsWith("__multiselect_")) {
+ String name = key.substring("__multiselect_".length());
+
+ iterator.remove();
+
+ // is this multi-select box submitted?
+ if (!parameters.containsKey(name)) {
+
+ // if not, let's be sure to default the value to an empty string array
+ newParams.put(name, new String[0]);
+ }
+ }
+ }
+
+ parameters.putAll(newParams);
+
+ return actionInvocation.invoke();
+ }
+}
\ No newline at end of file
Modified: struts/struts2/trunk/core/src/main/resources/struts-default.xml
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/struts-default.xml?rev=804072&r1=804071&r2=804072&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/struts-default.xml (original)
+++ struts/struts2/trunk/core/src/main/resources/struts-default.xml Fri Aug 14 03:16:35 2009
@@ -154,6 +154,7 @@
<interceptor name="roles" class="org.apache.struts2.interceptor.RolesInterceptor" />
<interceptor name="jsonValidation" class="org.apache.struts2.interceptor.validation.JSONValidationInterceptor" />
<interceptor name="annotationWorkflow" class="com.opensymphony.xwork2.interceptor.annotations.AnnotationWorkflowInterceptor" />
+ <interceptor name="multiselect" class="org.apache.struts2.interceptor.MultiselectInterceptor" />
<!-- Basic stack -->
<interceptor-stack name="basicStack">
@@ -161,6 +162,7 @@
<interceptor-ref name="servletConfig"/>
<interceptor-ref name="prepare"/>
<interceptor-ref name="checkbox"/>
+ <interceptor-ref name="multiselect"/>
<interceptor-ref name="actionMappingParams"/>
<interceptor-ref name="params">
<param name="excludeParams">dojo\..*,^struts\..*</param>
@@ -226,6 +228,7 @@
<interceptor-ref name="alias"/>
<interceptor-ref name="i18n"/>
<interceptor-ref name="checkbox"/>
+ <interceptor-ref name="multiselect"/>
<interceptor-ref name="params">
<param name="excludeParams">dojo\..*,^struts\..*</param>
</interceptor-ref>
@@ -272,6 +275,7 @@
<interceptor-ref name="modelDriven"/>
<interceptor-ref name="fileUpload"/>
<interceptor-ref name="checkbox"/>
+ <interceptor-ref name="multiselect"/>
<interceptor-ref name="staticParams"/>
<interceptor-ref name="actionMappingParams"/>
<interceptor-ref name="params">
Modified: struts/struts2/trunk/core/src/main/resources/template/simple/checkboxlist.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/simple/checkboxlist.ftl?rev=804072&r1=804071&r2=804072&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/simple/checkboxlist.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/simple/checkboxlist.ftl Fri Aug 14 03:16:35 2009
@@ -52,4 +52,9 @@
</...@s.iterator>
<#else>
-</#if>
\ No newline at end of file
+</#if>
+<input type="hidden" id="__multiselect_${parameters.id?html}" name="__multiselect_${parameters.name?html}" value=""<#rt/>
+<#if parameters.disabled?default(false)>
+ disabled="disabled"<#rt/>
+</#if>
+ />
\ No newline at end of file
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=804072&r1=804071&r2=804072&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 Fri Aug 14 03:16:35 2009
@@ -58,9 +58,16 @@
</#if>
<#if parameters.doubleMultiple?default(false)>
multiple="multiple"<#rt/>
-</#if>
+</#if>
>
</select>
+<#if parameters.doubleMultiple?default(false)>
+<input type="hidden" id="__multiselect_${parameters.doubleId?html}" name="__multiselect_${parameters.doubleName?default("")?html}" value=""<#rt/>
+<#if parameters.disabled?default(false)>
+ disabled="disabled"<#rt/>
+</#if>
+ />
+</#if>
<script type="text/javascript">
<#assign itemCount = startCount/>
var ${parameters.id}Group = new Array(${parameters.listSize} + ${startCount});
Modified: struts/struts2/trunk/core/src/main/resources/template/simple/optiontransferselect.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/simple/optiontransferselect.ftl?rev=804072&r1=804071&r2=804072&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/simple/optiontransferselect.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/simple/optiontransferselect.ftl Fri Aug 14 03:16:35 2009
@@ -30,9 +30,9 @@
<#if parameters.leftTitle??><#t/>
<label for="leftTitle">${parameters.leftTitle}</label><br />
</#if><#t/>
-<#include "/${parameters.templateDir}/simple/select.ftl" />
+<#include "/${parameters.templateDir}/simple/select.ftl" />
<#if parameters.allowUpDownOnLeft?default(true)>
-<input type="button"
+<input type="button"
onclick="moveOptionDown(document.getElementById('${parameters.id}'), 'key', <#if parameters.headerKey??>'${parameters.headerKey}'<#else>''</#if>);<#if parameters.upDownOnLeftOnclick?has_content>${parameters.upDownOnLeftOnclick};</#if>"
<#if parameters.leftDownLabel??>
value="${parameters.leftDownLabel?html}"
@@ -51,18 +51,18 @@
<#if parameters.allowAddToLeft?default(true)><#t/>
<#assign addToLeftLabel = parameters.addToLeftLabel?default("<-")?html/><#t/>
<#if parameters.doubleHeaderKey??><#t/>
- <input type="button"
+ <input type="button"
<#if parameters.buttonCssClass??><#t/>
- class="${parameters.buttonCssClass?html}"
+ class="${parameters.buttonCssClass?html}"
</#if><#t/>
<#if parameters.buttonCssStyle??><#t/>
style="${parameters.buttonCssStyle?html}"
</#if><#t/>
value="${addToLeftLabel}" onclick="moveSelectedOptions(document.getElementById('${parameters.doubleId?html}'), document.getElementById('${parameters.id?html}'), false, '${parameters.doubleHeaderKey}', '');<#if parameters.addToLeftOnclick?has_content>${parameters.addToLeftOnclick};</#if>" /><br /><br />
<#else><#t/>
- <input type="button"
+ <input type="button"
<#if parameters.buttonCssClass??><#t/>
- class="${parameters.buttonCssClass?html}"
+ class="${parameters.buttonCssClass?html}"
</#if><#t/>
<#if parameters.buttonCssStyle??><#t/>
style="${parameters.buttonCssStyle?html}"
@@ -73,9 +73,9 @@
<#if parameters.allowAddToRight?default(true)><#t/>
<#assign addToRightLabel=parameters.addToRightLabel?default("->")?html /><#t/>
<#if parameters.headerKey??><#t/>
- <input type="button"
+ <input type="button"
<#if parameters.buttonCssClass??><#t/>
- class="${parameters.buttonCssClass?html}"
+ class="${parameters.buttonCssClass?html}"
</#if><#t/>
<#if parameters.buttonCssStyle??><#t/>
style="${parameters.buttonCssStyle?html}"
@@ -84,7 +84,7 @@
<#else><#t/>
<input type="button"
<#if parameters.buttonCssClass??><#t/>
- class="${parameters.buttonCssClass?html}"
+ class="${parameters.buttonCssClass?html}"
</#if><#t/>
<#if parameters.buttonCssStyle??>
style="${parameters.buttonCssStyle?html}"
@@ -95,7 +95,7 @@
<#if parameters.allowAddAllToLeft?default(true)><#t/>
<#assign addAllToLeftLabel=parameters.addAllToLeftLabel?default("<<--")?html /><#t/>
<#if parameters.doubleHeaderKey??><#t/>
- <input type="button"
+ <input type="button"
<#if parameters.buttonCssClass??><#t/>
class="${parameters.buttonCssClass}"
</#if><#t/>
@@ -104,9 +104,9 @@
</#if><#t/>
value="${addAllToLeftLabel}" onclick="moveAllOptions(document.getElementById('${parameters.doubleId?html}'), document.getElementById('${parameters.id?html}'), false, '${parameters.doubleHeaderKey}', '');<#if parameters.addAllToLeftOnclick?has_content>${parameters.addAllToLeftOnclick};</#if>" /><br /><br />
<#else><#t/>
- <input type="button"
+ <input type="button"
<#if parameters.buttonCssClass??><#t/>
- class="${parameters.buttonCssClass?html}"
+ class="${parameters.buttonCssClass?html}"
</#if><#t/>
<#if parameters.buttonCssStyle??><#t/>
style="${parameters.buttonCssStyle?html}"
@@ -117,58 +117,58 @@
<#if parameters.allowAddAllToRight?default(true)><#t/>
<#assign addAllToRightLabel=parameters.addAllToRightLabel?default("-->>")?html /><#t/>
<#if parameters.headerKey??><#t/>
- <input type="button"
+ <input type="button"
<#if parameters.buttonCssClass??><#t/>
- class="${parameters.buttonCssClass?html}"
+ class="${parameters.buttonCssClass?html}"
</#if><#t/>
<#if parameters.buttonCssStyle??><#t/>
style="${parameters.buttonCssStyle?html}"
</#if><#t/>
- value="${addAllToRightLabel}" onclick="moveAllOptions(document.getElementById('${parameters.id?html}'), document.getElementById('${parameters.doubleId?html}'), false, '${parameters.headerKey}', '');<#if parameters.addAllToRightOnclick?has_content>${parameters.addAllToRightOnclick};</#if>" /><br /><br />
+ value="${addAllToRightLabel}" onclick="moveAllOptions(document.getElementById('${parameters.id?html}'), document.getElementById('${parameters.doubleId?html}'), false, '${parameters.headerKey}', '');<#if parameters.addAllToRightOnclick?has_content>${parameters.addAllToRightOnclick};</#if>" /><br /><br />
<#else><#t/>
- <input type="button"
+ <input type="button"
<#if parameters.buttonCssClass??><#t/>
- class="${parameters.buttonCssClass?html}"
+ class="${parameters.buttonCssClass?html}"
</#if><#t/>
<#if parameters.buttonCssStyle??><#t/>
style="${parameters.buttonCssStyle?html}"
</#if><#t/>
- value="${addAllToRightLabel}" onclick="moveAllOptions(document.getElementById('${parameters.id?html}'), document.getElementById('${parameters.doubleId?html}'), false, '');<#if parameters.addAllToRightOnclick?has_content>${parameters.addAllToRightOnclick};</#if>" /><br /><br />
+ value="${addAllToRightLabel}" onclick="moveAllOptions(document.getElementById('${parameters.id?html}'), document.getElementById('${parameters.doubleId?html}'), false, '');<#if parameters.addAllToRightOnclick?has_content>${parameters.addAllToRightOnclick};</#if>" /><br /><br />
</#if><#t/>
</#if><#t/>
<#if parameters.allowSelectAll?default(true)><#t/>
<#assign selectAllLabel=parameters.selectAllLabel?default("<*>")?html /><#t/>
<#if parameters.headerKey?? && parameters.doubleHeaderKey??><#t/>
- <input type="button"
+ <input type="button"
<#if parameters.buttonCssClass??><#t/>
- class="${parameters.buttonCssClass?html}"
+ class="${parameters.buttonCssClass?html}"
</#if><#t/>
<#if parameters.buttonCssStyle??><#t/>
style="${parameters.buttonCssStyle?html}"
</#if><#t/>
value="${selectAllLabel}" onclick="selectAllOptionsExceptSome(document.getElementById('${parameters.id?html}'), 'key', '${parameters.headerKey}');selectAllOptionsExceptSome(document.getElementById('${parameters.doubleId?html}'), 'key', '${parameters.doubleHeaderKey}');<#if parameters.selectAllOnclick?has_content>${parameters.selectAllOnclick};</#if>" /><br /><br />
<#elseif parameters.headerKey??><#t/>
- <input type="button"
+ <input type="button"
<#if parameters.buttonCssClass??><#t/>
- class="${parameters.buttonCssClass?html}"
+ class="${parameters.buttonCssClass?html}"
</#if><#t/>
<#if parameters.buttonCssStyle??><#t/>
style="${parameters.buttonCssStyle?html}"
</#if><#t/>
value="${selectAllLabel}" onclick="selectAllOptionsExceptSome(document.getElementById('${parameters.id?html}'), 'key', '${parameters.headerKey}');selectAllOptions(document.getElementById('${parameters.doubleId?html}'));<#if parameters.selectAllOnclick?has_content>${parameters.selectAllOnclick};</#if>" /><br /><br />
<#elseif parameters.doubleHeaderKey??><#t/>
- <input type="button"
+ <input type="button"
<#if parameters.buttonCssClass??><#t/>
- class="${parameters.buttonCssClass?html}"
+ class="${parameters.buttonCssClass?html}"
</#if><#t/>
<#if parameters.buttonCssStyle??><#t/>
style="${parameters.buttonCssStyle?html}"
</#if><#t/>
value="${selectAllLabel}" onclick="selectAllOptions(document.getElementById('${parameters.id?html}'));selectAllOptionsExceptSome(document.getElementById('${parameters.doubleId?html}'), 'key', '${parameters.doubleHeaderKey}');<#if parameters.selectAllOnclick?has_content>${parameters.selectAllOnclick};</#if>" /><br /><br />
<#else><#t/>
- <input type="button"
+ <input type="button"
<#if parameters.buttonCssClass??><#t/>
- class="${parameters.buttonCssClass?html}"
+ class="${parameters.buttonCssClass?html}"
</#if><#t/>
<#if parameters.buttonCssStyle??><#t/>
style="${parameters.buttonCssStyle?html}"
@@ -181,10 +181,10 @@
<#if parameters.rightTitle??><#t/>
<label for="rightTitle">${parameters.rightTitle}</label><br />
</#if><#t/>
-<select
+<select
name="${parameters.doubleName?default("")?html}"
<#if parameters.get("doubleSize")??><#t/>
- size="${parameters.get("doubleSize")?html}"
+ size="${parameters.get("doubleSize")?html}"
</#if><#t/>
<#if parameters.doubleDisabled?default(false)><#t/>
disabled="disabled"
@@ -272,14 +272,21 @@
>${doubleItemValue?html}</option><#lt/>
</...@s.iterator><#t/>
</select>
+<#if parameters.doubleMultiple?default(false)>
+<input type="hidden" id="__multiselect_${parameters.doubleId?html}" name="__multiselect_${parameters.doubleName?default("")?html}" value=""<#rt/>
+<#if parameters.doubleDisabled?default(false)>
+ disabled="disabled"<#rt/>
+</#if>
+ />
+</#if>
<#if parameters.allowUpDownOnRight?default(true)>
-<input type="button"
+<input type="button"
onclick="moveOptionDown(document.getElementById('${parameters.doubleId}'), 'key', <#if parameters.doubleHeaderKey??>'${parameters.doubleHeaderKey}'<#else>''</#if>);<#if parameters.upDownOnRightOnclick?has_content>${parameters.upDownOnRightOnclick};</#if>"
<#if parameters.rightDownLabel??>
value="${parameters.rightDownLabel?html}"
</#if>
/>
-<input type="button"
+<input type="button"
onclick="moveOptionUp(document.getElementById('${parameters.doubleId}'), 'key', <#if parameters.doubleHeaderKey??>'${parameters.doubleHeaderKey}'<#else>''</#if>);<#if parameters.upDownOnRightOnclick?has_content>${parameters.upDownOnRightOnclick};</#if>"
<#if parameters.rightUpLabel??>
value="${parameters.rightUpLabel?html}"
Modified: struts/struts2/trunk/core/src/main/resources/template/simple/select.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/simple/select.ftl?rev=804072&r1=804071&r2=804072&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/simple/select.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/simple/select.ftl Fri Aug 14 03:16:35 2009
@@ -87,4 +87,11 @@
<#include "/${parameters.templateDir}/simple/optgroup.ftl" />
-</select>
\ No newline at end of file
+</select>
+<#if parameters.multiple?default(false)>
+<input type="hidden" id="__multiselect_${parameters.id?html}" name="__multiselect_${parameters.name?html}" value=""<#rt/>
+<#if parameters.disabled?default(false)>
+ disabled="disabled"<#rt/>
+</#if>
+ />
+</#if>
\ No newline at end of file
Added: struts/struts2/trunk/core/src/test/java/org/apache/struts2/interceptor/MultiselectInterceptorTest.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/java/org/apache/struts2/interceptor/MultiselectInterceptorTest.java?rev=804072&view=auto
==============================================================================
--- struts/struts2/trunk/core/src/test/java/org/apache/struts2/interceptor/MultiselectInterceptorTest.java (added)
+++ struts/struts2/trunk/core/src/test/java/org/apache/struts2/interceptor/MultiselectInterceptorTest.java Fri Aug 14 03:16:35 2009
@@ -0,0 +1,131 @@
+/*
+ * $Id: MessageStoreInterceptorTest.java 651946 2008-04-27 13:41:38Z apetrelli $
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package org.apache.struts2.interceptor;
+
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.opensymphony.xwork2.ActionContext;
+import com.opensymphony.xwork2.mock.MockActionInvocation;
+
+import org.apache.struts2.StrutsTestCase;
+
+/**
+ * Unit test for MultiselectInterceptor.
+ */
+public class MultiselectInterceptorTest extends StrutsTestCase {
+
+ private MultiselectInterceptor interceptor;
+ private MockActionInvocation ai;
+ private Map<String, Object> param;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ param = new HashMap<String, Object>();
+
+ interceptor = new MultiselectInterceptor();
+ ai = new MockActionInvocation();
+ ai.setInvocationContext(ActionContext.getContext());
+ ActionContext.getContext().setParameters(param);
+ }
+
+ public void testNoParam() throws Exception {
+ interceptor.init();
+ interceptor.intercept(ai);
+ interceptor.destroy();
+
+ assertEquals(0, param.size());
+ }
+
+ public void testPassthroughOne() throws Exception {
+ param.put("user", "batman");
+ interceptor.init();
+ interceptor.intercept(ai);
+ interceptor.destroy();
+
+ assertEquals(1, param.size());
+ }
+
+ public void testPassthroughTwo() throws Exception {
+ param.put("user", "batman");
+ param.put("email", "batman@comic.org");
+ interceptor.init();
+ interceptor.intercept(ai);
+ interceptor.destroy();
+
+ assertEquals(2, param.size());
+ }
+
+ public void testSelectedMultiselect() throws Exception {
+ param.put("user", "batman");
+ param.put("email", "batman@comic.org");
+ param.put("superpower", "robin");
+ param.put("__multiselect_superpower", "");
+ assertTrue(param.containsKey("__multiselect_superpower"));
+
+ interceptor.init();
+ interceptor.intercept(ai);
+ interceptor.destroy();
+
+ assertFalse(param.containsKey("__multiselect_superpower"));
+ assertEquals(3, param.size()); // should be 3 as __multiselect_ should be removed
+ assertEquals("robin", param.get("superpower"));
+ }
+
+ public void testMultiselectNoValue() throws Exception {
+ param.put("user", "batman");
+ param.put("email", "batman@comic.org");
+ param.put("__multiselect_superpower", "");
+ assertTrue(param.containsKey("__multiselect_superpower"));
+
+ interceptor.init();
+ interceptor.intercept(ai);
+ interceptor.destroy();
+
+ assertFalse(param.containsKey("__multiselect_superpower"));
+ assertEquals(3, param.size()); // should be 3 as __multiselect_ should be removed
+ assertEquals(0, ((String[]) param.get("superpower")).length);
+ }
+
+ public void testTwoMultiselect() throws Exception {
+ param.put("user", "batman");
+ param.put("email", "batman@comic.org");
+ param.put("__multiselect_superpower", "");
+ param.put("superpower", "yes");
+ param.put("__multiselect_cool", "");
+ assertTrue(param.containsKey("__multiselect_superpower"));
+ assertTrue(param.containsKey("__multiselect_cool"));
+
+ interceptor.init();
+ interceptor.intercept(ai);
+ interceptor.destroy();
+
+ assertFalse(param.containsKey("__multiselect_superpower"));
+ assertFalse(param.containsKey("__multiselect_cool"));
+ assertEquals(4, param.size()); // should be 4 as __multiselect_ should be removed
+ assertEquals("yes", param.get("superpower"));
+ assertEquals(0, ((String[]) param.get("cool")).length);
+ }
+
+}
\ No newline at end of file
Modified: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/CheckboxList-1.txt
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/CheckboxList-1.txt?rev=804072&r1=804071&r2=804072&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/CheckboxList-1.txt (original)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/CheckboxList-1.txt Fri Aug 14 03:16:35 2009
@@ -7,5 +7,6 @@
<label for="foo-2" class="checkboxLabel">bar</label>
<input type="checkbox" name="foo" value="baz" id="foo-3" title="mytitle" onchange="alert('foo');"/>
<label for="foo-3" class="checkboxLabel"></label>
+<input type="hidden" id="__multiselect_foo" name="__multiselect_foo" value=""/>
</td>
</tr>
Modified: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/CheckboxList-2.txt
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/CheckboxList-2.txt?rev=804072&r1=804071&r2=804072&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/CheckboxList-2.txt (original)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/CheckboxList-2.txt Fri Aug 14 03:16:35 2009
@@ -7,5 +7,6 @@
<label for="collection-2" class="checkboxLabel">bar</label>
<input type="checkbox" name="collection" value="cat" id="collection-3"/>
<label for="collection-3" class="checkboxLabel">dog</label>
+<input type="hidden" id="__multiselect_collection" name="__multiselect_collection" value=""/>
</td>
</tr>
Modified: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/CheckboxList-3.txt
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/CheckboxList-3.txt?rev=804072&r1=804071&r2=804072&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/CheckboxList-3.txt (original)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/CheckboxList-3.txt Fri Aug 14 03:16:35 2009
@@ -7,5 +7,6 @@
<label for="collection-2" class="checkboxLabel">bar</label>
<input type="checkbox" name="collection" value="cat" id="collection-3" disabled="disabled"/>
<label for="collection-3" class="checkboxLabel">dog</label>
+<input type="hidden" id="__multiselect_collection" name="__multiselect_collection" value="" disabled="disabled"/>
</td>
</tr>
Modified: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/CheckboxList-4.txt
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/CheckboxList-4.txt?rev=804072&r1=804071&r2=804072&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/CheckboxList-4.txt (original)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/CheckboxList-4.txt Fri Aug 14 03:16:35 2009
@@ -5,5 +5,6 @@
<label for="foo-1" class="checkboxLabel">world</label>
<input type="checkbox" name="foo" value="foo" id="foo-2" disabled="disabled" onchange="alert('foo');"/>
<label for="foo-2" class="checkboxLabel">bar</label>
+<input type="hidden" id="__multiselect_foo" name="__multiselect_foo" value="" disabled="disabled"/>
</td>
</tr>
Modified: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-11.txt
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-11.txt?rev=804072&r1=804071&r2=804072&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-11.txt (original)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-11.txt Fri Aug 14 03:16:35 2009
@@ -7,7 +7,9 @@
<table>
<tr><td>
<select name="myUpDownSelectTag" size="5" id="myAction_myUpDownSelectTag" multiple="multiple">
-</select></td></tr>
+</select>
+<input type="hidden" id="__multiselect_myAction_myUpDownSelectTag" name="__multiselect_myUpDownSelectTag"value=""/>
+</td></tr>
<tr><td>
<input type="button" value="^" onclick="moveOptionUp(document.getElementById('myAction_myUpDownSelectTag'), 'key', '');" />
<input type="button" value="v" onclick="moveOptionDown(document.getElementById('myAction_myUpDownSelectTag'), 'key', '');" />
Modified: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-2.txt
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-2.txt?rev=804072&r1=804071&r2=804072&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-2.txt (original)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-2.txt Fri Aug 14 03:16:35 2009
@@ -7,7 +7,9 @@
<table>
<tr><td>
<select name="myUpDownSelectTag" size="5" id="myAction_myUpDownSelectTag" multiple="multiple">
-</select></td></tr>
+</select>
+<input type="hidden" id="__multiselect_myAction_myUpDownSelectTag" name="__multiselect_myUpDownSelectTag"value=""/>
+</td></tr>
<tr><td>
<input type="button" value="^" onclick="moveOptionUp(document.getElementById('myAction_myUpDownSelectTag'), 'key', '');" />
<input type="button" value="v" onclick="moveOptionDown(document.getElementById('myAction_myUpDownSelectTag'), 'key', '');" />
Modified: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-22.txt
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-22.txt?rev=804072&r1=804071&r2=804072&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-22.txt (original)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-22.txt Fri Aug 14 03:16:35 2009
@@ -7,7 +7,9 @@
<table>
<tr><td>
<select name="myUpDownSelectTag" size="5" id="myAction_myUpDownSelectTag" multiple="multiple">
-</select></td></tr>
+</select>
+<input type="hidden" id="__multiselect_myAction_myUpDownSelectTag" name="__multiselect_myUpDownSelectTag"value=""/>
+</td></tr>
<tr><td>
<input type="button" value="^" onclick="moveOptionUp(document.getElementById('myAction_myUpDownSelectTag'), 'key', '');" />
<input type="button" value="v" onclick="moveOptionDown(document.getElementById('myAction_myUpDownSelectTag'), 'key', '');" />
Modified: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-24.txt
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-24.txt?rev=804072&r1=804071&r2=804072&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-24.txt (original)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-24.txt Fri Aug 14 03:16:35 2009
@@ -7,7 +7,9 @@
<table>
<tr><td>
<select name="myUpDownSelectTag" size="5" id="myAction_myUpDownSelectTag" multiple="multiple">
-</select></td></tr>
+</select>
+<input type="hidden" id="__multiselect_myAction_myUpDownSelectTag" name="__multiselect_myUpDownSelectTag"value=""/>
+</td></tr>
<tr><td>
<input type="button" value="^" onclick="moveOptionUp(document.getElementById('myAction_myUpDownSelectTag'), 'key', '');" />
<input type="button" value="v" onclick="moveOptionDown(document.getElementById('myAction_myUpDownSelectTag'), 'key', '');" />
Modified: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-6.txt
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-6.txt?rev=804072&r1=804071&r2=804072&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-6.txt (original)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-6.txt Fri Aug 14 03:16:35 2009
@@ -5,7 +5,9 @@
<table>
<tr><td>
<select name="myUpDownSelectTag" size="5" id="myAction_myUpDownSelectTag" multiple="multiple">
-</select></td></tr>
+</select>
+<input type="hidden" id="__multiselect_myAction_myUpDownSelectTag" name="__multiselect_myUpDownSelectTag"value=""/>
+</td></tr>
<tr><td>
<input type="button" value="^" onclick="moveOptionUp(document.getElementById('myAction_myUpDownSelectTag'), 'key', '');" />
<input type="button" value="v" onclick="moveOptionDown(document.getElementById('myAction_myUpDownSelectTag'), 'key', '');" />
Modified: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/OptGroup-3.txt
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/OptGroup-3.txt?rev=804072&r1=804071&r2=804072&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/OptGroup-3.txt (original)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/OptGroup-3.txt Fri Aug 14 03:16:35 2009
@@ -38,5 +38,6 @@
</optgroup>
</select>
+<input type="hidden" id="__multiselect_mySelection" name="__multiselect_mySelection" value=""/>
</td>
</tr>
\ No newline at end of file
Modified: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Select-10.txt
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Select-10.txt?rev=804072&r1=804071&r2=804072&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Select-10.txt (original)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Select-10.txt Fri Aug 14 03:16:35 2009
@@ -3,5 +3,7 @@
<td><select name="collection" id="collection" title="mytitle" multiple="multiple" onmousedown="alert('onmousedown');" onmouseup="alert('onmouseup');" onmouseover="alert('onmouseover');" onmousemove="alert('onmousemove');" onmouseout="alert('onmouseout');">
<option value="1" selected="selected">hello</option>
<option value="2" selected="selected">foo</option>
-</select></td>
+</select>
+<inputtype="hidden" id="__multiselect_collection" name="__multiselect_collection" value=""/>
+</td>
</tr>
Modified: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Select-12.txt
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Select-12.txt?rev=804072&r1=804071&r2=804072&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Select-12.txt (original)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Select-12.txt Fri Aug 14 03:16:35 2009
@@ -4,5 +4,7 @@
<option value="1" selected="selected">foo</option>
<option value="2">bar</option>
<option value="300000000" selected="selected">foobar</option>
-</select></td>
+</select>
+<inputtype="hidden" id="__multiselect_collection" name="__multiselect_collection" value=""/>
+</td>
</tr>
Modified: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Select-2.txt
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Select-2.txt?rev=804072&r1=804071&r2=804072&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Select-2.txt (original)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Select-2.txt Fri Aug 14 03:16:35 2009
@@ -4,5 +4,7 @@
<option value="hello" selected="selected">world</option>
<option value="foo" selected="selected">bar</option>
<option value="cat">dog</option>
-</select></td>
+</select>
+<inputtype="hidden" id="__multiselect_collection" name="__multiselect_collection" value=""/>
+</td>
</tr>
Modified: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Select-3.txt
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Select-3.txt?rev=804072&r1=804071&r2=804072&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Select-3.txt (original)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Select-3.txt Fri Aug 14 03:16:35 2009
@@ -4,5 +4,7 @@
<option value="hello" selected="selected">1</option>
<option value="foo" selected="selected">2</option>
<option value="<cat>">1.5</option>
-</select></td>
+</select>
+<inputtype="hidden" id="__multiselect_collection" name="__multiselect_collection" value=""/>
+</td>
</tr>
Modified: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Select-5.txt
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Select-5.txt?rev=804072&r1=804071&r2=804072&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Select-5.txt (original)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Select-5.txt Fri Aug 14 03:16:35 2009
@@ -4,5 +4,7 @@
<option value=""></option>
<option value="aaa">aaa</option>
<option value="bbb">bbb</option>
-</select></td>
+</select>
+<input type="hidden" id="__multiselect_myId" name="__multiselect_myName" value=""/>
+</td>
</tr>
Modified: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/inputtransferselect-1.txt
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/inputtransferselect-1.txt?rev=804072&r1=804071&r2=804072&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/inputtransferselect-1.txt (original)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/inputtransferselect-1.txt Fri Aug 14 03:16:35 2009
@@ -16,6 +16,7 @@
<selectname="collection"size="5"id="collection"multiple="multiple">
<optionvalue="ItemOne"selected="selected">ItemOne</option>
<optionvalue="ItemTwo"selected="selected">ItemTwo</option></select>
+ <inputtype="hidden"id="__multiselect_collection"name="__multiselect_collection"value=""/>
<inputtype="button"onclick="moveOptionDown(document.getElementById('collection'),'key','');"value="v"/>
<inputtype="button"onclick="moveOptionUp(document.getElementById('collection'),'key','');"value="^"/>
</td></tr>
Modified: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-1.txt
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-1.txt?rev=804072&r1=804071&r2=804072&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-1.txt (original)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-1.txt Fri Aug 14 03:16:35 2009
@@ -12,6 +12,7 @@
<option value="Left1" selected="selected">Left1</option>
<option value="Left2" selected="selected">Left2</option>
</select>
+ <input type="hidden" id="__multiselect_id" name="__multiselect_collection" value=""/>
<input type="button" onclick="moveOptionDown(document.getElementById('id'), 'key', 'Header Key');" value="v" />
<input type="button" onclick="moveOptionUp(document.getElementById('id'), 'key', 'Header Key');" value="^" />
</td>
@@ -41,7 +42,8 @@
<option value=""></option>
<option value="Right1" selected="selected">Right1</option>
<option value="Right2" selected="selected">Right2</option>
- </select>
+ </select>
+ <input type="hidden" id="__multiselect_doubleId" name="__multiselect_list2" value=""/>
<input type="button" onclick="moveOptionDown(document.getElementById('doubleId'), 'key', 'Double Header Key');" value="v" />
<input type="button" onclick="moveOptionUp(document.getElementById('doubleId'), 'key', 'Double Header Key');" value="^" />
</td>
Modified: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-2.txt
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-2.txt?rev=804072&r1=804071&r2=804072&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-2.txt (original)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-2.txt Fri Aug 14 03:16:35 2009
@@ -12,7 +12,8 @@
<option value="Left1">Left1</option>
<option value="Left2" selected="selected">Left2</option>
<option value="Left3">Left3</option>
- </select>
+ </select>
+ <input type="hidden" id="__multiselect_id" name="__multiselect_collection" value=""/>
<input type="button" onclick="moveOptionDown(document.getElementById('id'), 'key', 'Header Key');" value="v" />
<input type="button" onclick="moveOptionUp(document.getElementById('id'), 'key', 'Header Key');" value="^" />
</td>
@@ -41,6 +42,7 @@
<option value="Right2" selected="selected">Right2</option>
<option value="Right3">Right3</option>
</select>
+ <input type="hidden" id="__multiselect_doubleId" name="__multiselect_list2" value=""/>
<input type="button" onclick="moveOptionDown(document.getElementById('doubleId'), 'key', 'Double Header Key');" value="v" />
<input type="button" onclick="moveOptionUp(document.getElementById('doubleId'), 'key', 'Double Header Key');" value="^" />
</td>
Modified: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-3.txt
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-3.txt?rev=804072&r1=804071&r2=804072&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-3.txt (original)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-3.txt Fri Aug 14 03:16:35 2009
@@ -11,7 +11,8 @@
<option value="Left1">Left1</option>
<option value="Left2" selected="selected">Left2</option>
<option value="Left3">Left3</option>
- </select>
+ </select>
+ <input type="hidden" id="__multiselect_id" name="__multiselect_collection" value=""/>
<input type="button" onclick="moveOptionDown(document.getElementById('id'), 'key', '');" value="v" />
<input type="button" onclick="moveOptionUp(document.getElementById('id'), 'key', '');" value="^" />
</td>
@@ -40,6 +41,7 @@
<option value="Right2" selected="selected">Right2</option>
<option value="Right3">Right3</option>
</select>
+ <input type="hidden" id="__multiselect_doubleId" name="__multiselect_list2" value=""/>
<input type="button" onclick="moveOptionDown(document.getElementById('doubleId'), 'key', '');" value="v" />
<input type="button" onclick="moveOptionUp(document.getElementById('doubleId'), 'key', '');" value="^" />
</td>
Modified: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-4.txt
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-4.txt?rev=804072&r1=804071&r2=804072&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-4.txt (original)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-4.txt Fri Aug 14 03:16:35 2009
@@ -12,7 +12,8 @@
<option value="Left1">Left1</option>
<option value="Left2" selected="selected">Left2</option>
<option value="Left3">Left3</option>
- </select>
+ </select>
+ <input type="hidden" id="__multiselect_id" name="__multiselect_collection" value=""/>
<input type="button" onclick="moveOptionDown(document.getElementById('id'), 'key', 'Header Key');" value="v" />
<input type="button" onclick="moveOptionUp(document.getElementById('id'), 'key', 'Header Key');" value="^" />
</td>
@@ -41,6 +42,7 @@
<option value="Right2" selected="selected">Right2</option>
<option value="Right3">Right3</option>
</select>
+ <input type="hidden" id="__multiselect_doubleId" name="__multiselect_list2" value=""/>
<input type="button" onclick="moveOptionDown(document.getElementById('doubleId'), 'key', '');" value="v" />
<input type="button" onclick="moveOptionUp(document.getElementById('doubleId'), 'key', '');" value="^" />
Modified: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-5.txt
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-5.txt?rev=804072&r1=804071&r2=804072&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-5.txt (original)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-5.txt Fri Aug 14 03:16:35 2009
@@ -11,7 +11,8 @@
<option value="Left1">Left1</option>
<option value="Left2" selected="selected">Left2</option>
<option value="Left3">Left3</option>
- </select>
+ </select>
+ <input type="hidden" id="__multiselect_id" name="__multiselect_collection" value=""/>
<input type="button" onclick="moveOptionDown(document.getElementById('id'), 'key', 'Header Key');" value="v" />
<input type="button" onclick="moveOptionUp(document.getElementById('id'), 'key', 'Header Key');" value="^" />
</td>
@@ -40,6 +41,7 @@
<option value="Right2" selected="selected">Right2</option>
<option value="Right3">Right3</option>
</select>
+ <input type="hidden" id="__multiselect_doubleId" name="__multiselect_list2" value=""/>
<input type="button" onclick="moveOptionDown(document.getElementById('doubleId'), 'key', 'Double Header Key');" value="v" />
<input type="button" onclick="moveOptionUp(document.getElementById('doubleId'), 'key', 'Double Header Key');" value="^" />
</td>
Modified: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-6.txt
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-6.txt?rev=804072&r1=804071&r2=804072&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-6.txt (original)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-6.txt Fri Aug 14 03:16:35 2009
@@ -12,7 +12,8 @@
<option value="Left1">Left1</option>
<option value="Left2" selected="selected">Left2</option>
<option value="Left3">Left3</option>
- </select>
+ </select>
+ <input type="hidden" id="__multiselect_id" name="__multiselect_collection" value=""/>
<input type="button" onclick="moveOptionDown(document.getElementById('id'), 'key', 'Header Key');" value="v" />
<input type="button" onclick="moveOptionUp(document.getElementById('id'), 'key', 'Header Key');" value="^" />
</td>
@@ -41,6 +42,7 @@
<option value="Right2" selected="selected">Right2</option>
<option value="Right3">Right3</option>
</select>
+ <input type="hidden" id="__multiselect_doubleId" name="__multiselect_list2" value=""/>
<input type="button" onclick="moveOptionDown(document.getElementById('doubleId'), 'key', 'Double Header Key');" value="v" />
<input type="button" onclick="moveOptionUp(document.getElementById('doubleId'), 'key', 'Double Header Key');" value="^" />
</td>
Modified: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-7.txt
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-7.txt?rev=804072&r1=804071&r2=804072&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-7.txt (original)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-7.txt Fri Aug 14 03:16:35 2009
@@ -12,7 +12,8 @@
<option value="Left1">Left1</option>
<option value="Left2" selected="selected">Left2</option>
<option value="Left3">Left3</option>
- </select>
+ </select>
+ <input type="hidden" id="__multiselect_id" name="__multiselect_collection" value=""/>
<input type="button" onclick="moveOptionDown(document.getElementById('id'), 'key', 'Header Key');" value="v" />
<input type="button" onclick="moveOptionUp(document.getElementById('id'), 'key', 'Header Key');" value="^" />
</td>
@@ -36,6 +37,7 @@
<option value="Right2" selected="selected">Right2</option>
<option value="Right3">Right3</option>
</select>
+ <input type="hidden" id="__multiselect_doubleId" name="__multiselect_list2" value=""/>
<input type="button" onclick="moveOptionDown(document.getElementById('doubleId'), 'key', 'Double Header Key');" value="v" />
<input type="button" onclick="moveOptionUp(document.getElementById('doubleId'), 'key', 'Double Header Key');" value="^" />
</td>
Modified: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-1.txt
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-1.txt?rev=804072&r1=804071&r2=804072&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-1.txt (original)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-1.txt Fri Aug 14 03:16:35 2009
@@ -8,7 +8,9 @@
<option value="america" selected="selected">America</option>
<option value="australia" selected="selected">Australia</option>
<option value="germany" selected="selected">Germany</option>
-</select></td></tr>
+</select>
+<input type="hidden" id="__multiselect_myId" name="__multiselect_myName"value=""/>
+</td></tr>
<tr><td>
<input type="button" value="^" onclick="moveOptionUp(document.getElementById('myId'), 'key', '');" />
<input type="button" value="v" onclick="moveOptionDown(document.getElementById('myId'), 'key', '');" />
Modified: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-10.txt
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-10.txt?rev=804072&r1=804071&r2=804072&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-10.txt (original)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-10.txt Fri Aug 14 03:16:35 2009
@@ -8,7 +8,9 @@
<option value="america" selected="selected">America</option>
<option value="australia">Australia</option>
<option value="germany" selected="selected">Germany</option>
-</select></td></tr>
+</select>
+<input type="hidden" id="__multiselect_myId" name="__multiselect_myName" value=""/>
+</td></tr>
<tr><td>
<input type="button" value="Move Up" onclick="moveOptionUp(document.getElementById('myId'), 'key', '');" />
<input type="button" value="v" onclick="moveOptionDown(document.getElementById('myId'), 'key', '');" />
Modified: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-11.txt
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-11.txt?rev=804072&r1=804071&r2=804072&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-11.txt (original)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-11.txt Fri Aug 14 03:16:35 2009
@@ -8,7 +8,9 @@
<option value="america" selected="selected">America</option>
<option value="australia">Australia</option>
<option value="germany" selected="selected">Germany</option>
-</select></td></tr>
+</select>
+<input type="hidden" id="__multiselect_myId" name="__multiselect_myName" value=""/>
+</td></tr>
<tr><td>
<input type="button" value="^" onclick="moveOptionUp(document.getElementById('myId'), 'key', '');" />
<input type="button" value="Move Down" onclick="moveOptionDown(document.getElementById('myId'), 'key', '');" />
Modified: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-2.txt
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-2.txt?rev=804072&r1=804071&r2=804072&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-2.txt (original)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-2.txt Fri Aug 14 03:16:35 2009
@@ -7,7 +7,9 @@
<option value="america" selected="selected">America</option>
<option value="australia">Australia</option>
<option value="germany" selected="selected">Germany</option>
-</select></td></tr>
+</select>
+<input type="hidden" id="__multiselect_myId" name="__multiselect_myName" value=""/>
+</td></tr>
<tr><td>
<input type="button" value="^" onclick="moveOptionUp(document.getElementById('myId'), 'key', '');" />
<input type="button" value="v" onclick="moveOptionDown(document.getElementById('myId'), 'key', '');" />
Modified: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-3.txt
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-3.txt?rev=804072&r1=804071&r2=804072&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-3.txt (original)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-3.txt Fri Aug 14 03:16:35 2009
@@ -9,7 +9,9 @@
<option value="america" selected="selected">America</option>
<option value="australia">Australia</option>
<option value="germany" selected="selected">Germany</option>
-</select></td></tr>
+</select>
+<input type="hidden" id="__multiselect_myId" name="__multiselect_myName" value=""/>
+</td></tr>
<tr><td>
<input type="button" value="^" onclick="moveOptionUp(document.getElementById('myId'), 'key', '-1');" />
<input type="button" value="v" onclick="moveOptionDown(document.getElementById('myId'), 'key', '-1');" />
Modified: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-4.txt
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-4.txt?rev=804072&r1=804071&r2=804072&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-4.txt (original)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-4.txt Fri Aug 14 03:16:35 2009
@@ -8,7 +8,9 @@
<option value="america" selected="selected">America</option>
<option value="australia">Australia</option>
<option value="germany" selected="selected">Germany</option>
-</select></td></tr>
+</select>
+<input type="hidden" id="__multiselect_myId" name="__multiselect_myName" value=""/>
+</td></tr>
<tr><td>
<input type="button" value="^" onclick="moveOptionUp(document.getElementById('myId'), 'key', '-1');" />
<input type="button" value="v" onclick="moveOptionDown(document.getElementById('myId'), 'key', '-1');" />
Modified: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-5.txt
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-5.txt?rev=804072&r1=804071&r2=804072&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-5.txt (original)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-5.txt Fri Aug 14 03:16:35 2009
@@ -8,7 +8,9 @@
<option value="america" selected="selected">America</option>
<option value="australia">Australia</option>
<option value="germany" selected="selected">Germany</option>
-</select></td></tr>
+</select>
+<input type="hidden" id="__multiselect_myId" name="__multiselect_myName" value=""/>
+</td></tr>
<tr><td>
<input type="button" value="^" onclick="moveOptionUp(document.getElementById('myId'), 'key', '');" />
<input type="button" value="v" onclick="moveOptionDown(document.getElementById('myId'), 'key', '');" />
Modified: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-6.txt
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-6.txt?rev=804072&r1=804071&r2=804072&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-6.txt (original)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-6.txt Fri Aug 14 03:16:35 2009
@@ -8,7 +8,9 @@
<option value="america" selected="selected">America</option>
<option value="australia">Australia</option>
<option value="germany" selected="selected">Germany</option>
-</select></td></tr>
+</select>
+<input type="hidden" id="__multiselect_myId" name="__multiselect_myName" value=""/>
+</td></tr>
<tr><td>
<input type="button" value="^" onclick="moveOptionUp(document.getElementById('myId'), 'key', '');" />
<input type="button" value="v" onclick="moveOptionDown(document.getElementById('myId'), 'key', '');" />
Modified: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-7.txt
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-7.txt?rev=804072&r1=804071&r2=804072&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-7.txt (original)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-7.txt Fri Aug 14 03:16:35 2009
@@ -8,7 +8,9 @@
<option value="america" selected="selected">America</option>
<option value="australia">Australia</option>
<option value="germany" selected="selected">Germany</option>
-</select></td></tr>
+</select>
+<input type="hidden" id="__multiselect_myId" name="__multiselect_myName" value=""/>
+</td></tr>
<tr><td>
<input type="button" value="v" onclick="moveOptionDown(document.getElementById('myId'), 'key', '');" />
<input type="button" value="*" onclick="selectAllOptions(document.getElementById('myId'), 'key', '');" />
Modified: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-8.txt
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-8.txt?rev=804072&r1=804071&r2=804072&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-8.txt (original)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-8.txt Fri Aug 14 03:16:35 2009
@@ -8,7 +8,9 @@
<option value="america" selected="selected">America</option>
<option value="australia">Australia</option>
<option value="germany" selected="selected">Germany</option>
-</select></td></tr>
+</select>
+<input type="hidden" id="__multiselect_myId" name="__multiselect_myName" value=""/>
+</td></tr>
<tr><td>
<input type="button" value="^" onclick="moveOptionUp(document.getElementById('myId'), 'key', '');" />
<input type="button" value="*" onclick="selectAllOptions(document.getElementById('myId'), 'key', '');" />
Modified: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-9.txt
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-9.txt?rev=804072&r1=804071&r2=804072&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-9.txt (original)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-9.txt Fri Aug 14 03:16:35 2009
@@ -8,7 +8,9 @@
<option value="america" selected="selected">America</option>
<option value="australia">Australia</option>
<option value="germany" selected="selected">Germany</option>
-</select></td></tr>
+</select>
+<input type="hidden" id="__multiselect_myId" name="__multiselect_myName" value=""/>
+</td></tr>
<tr><td>
<input type="button" value="^" onclick="moveOptionUp(document.getElementById('myId'), 'key', '');" />
<input type="button" value="v" onclick="moveOptionDown(document.getElementById('myId'), 'key', '');" />