struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bphill...@apache.org
Subject svn commit: r1509747 - /struts/struts2/trunk/core/src/main/resources/template/simple/select.ftl
Date Fri, 02 Aug 2013 15:41:27 GMT
Author: bphillips
Date: Fri Aug  2 15:41:26 2013
New Revision: 1509747

URL: http://svn.apache.org/r1509747
Log:
WW-4153 added Freemarker markup to handle use case when multiple="true" attribute is included
with s:select tag but no name or id attribute is provided.  

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

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=1509747&r1=1509746&r2=1509747&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  2 15:41:26
2013
@@ -118,8 +118,21 @@
 <#include "/${parameters.templateDir}/simple/optgroup.ftl" />
 
 </select>
+
 <#if parameters.multiple?default(false)>
-<input type="hidden" id="__multiselect_${parameters.id?html}" name="__multiselect_${parameters.name?html}"
value=""<#rt/>
+  <#if (parameters.id?? && parameters.name??)>
+    <input type="hidden" id="__multiselect_${parameters.id?html}" name="__multiselect_${parameters.name?html}"
value=""<#rt/>
+  </#if>
+  <#if (parameters.id?? && !parameters.name??)>
+    <input type="hidden" id="__multiselect_${parameters.id?html}" name="__multiselect_${parameters.id?html}"
value=""<#rt/>
+  </#if>
+  <#if ( !parameters.id?? && parameters.name??)>
+    <input type="hidden" id="__multiselect_${parameters.id?html}" name="__multiselect_${parameters.id?html}"
value=""<#rt/>
+  </#if>
+   <#if ( !parameters.id?? && !parameters.name??)>
+     <input type="hidden" id="" name="" value="" <#rt/>
+  </#if>
+  
 <#if parameters.disabled?default(false)>
  disabled="disabled"<#rt/>
 </#if>



Mime
View raw message