You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by jh...@apache.org on 2008/06/14 22:44:48 UTC

svn commit: r667876 - /struts/struts2/trunk/core/src/main/resources/template/simple/checkboxlist.ftl

Author: jholmes
Date: Sat Jun 14 13:44:48 2008
New Revision: 667876

URL: http://svn.apache.org/viewvc?rev=667876&view=rev
Log:
WW-2238 checkboxlist labels and values mixed up

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

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=667876&r1=667875&r2=667876&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 Sat Jun 14 13:44:48 2008
@@ -34,6 +34,11 @@
         <#else>
             <#assign itemValue = stack.findString('top')/>
         </#if>
+        <#if parameters.label?exists> 
+            <#assign itemLabel = stack.findString(parameters.label)/> 
+        <#else> 
+            <#assign itemLabel = itemValue/> 
+        </#if>
 <#assign itemKeyStr=itemKey.toString() />
 <input type="checkbox" name="${parameters.name?html}" value="${itemKeyStr?html}" id="${parameters.name?html}-${itemCount}"<#rt/>
         <#if tag.contains(parameters.nameValue, itemKey)>
@@ -48,7 +53,7 @@
         <#include "/${parameters.templateDir}/simple/scripting-events.ftl" />
         <#include "/${parameters.templateDir}/simple/common-attributes.ftl" />
 />
-<label for="${parameters.name?html}-${itemCount}" class="checkboxLabel">${itemValue?html}</label>
+<label for="${parameters.name?html}-${itemCount}" class="checkboxLabel">${itemLabel?html}</label>
     </...@s.iterator>
 <#else>
   &nbsp;