struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject git commit: WW-4313 Uses name instead of id if the other isn't set
Date Sun, 30 Mar 2014 07:46:00 GMT
Repository: struts
Updated Branches:
  refs/heads/develop 1fae47dfc -> 9a94699da


WW-4313 Uses name instead of id if the other isn't set


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/9a94699d
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/9a94699d
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/9a94699d

Branch: refs/heads/develop
Commit: 9a94699da0f1044cf0dad1acd717fccb715e45ea
Parents: 1fae47d
Author: Lukasz Lenart <lukaszlenart@apache.org>
Authored: Sun Mar 30 09:45:45 2014 +0200
Committer: Lukasz Lenart <lukaszlenart@apache.org>
Committed: Sun Mar 30 09:45:45 2014 +0200

----------------------------------------------------------------------
 .../main/resources/template/simple/checkboxlist.ftl   | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/9a94699d/core/src/main/resources/template/simple/checkboxlist.ftl
----------------------------------------------------------------------
diff --git a/core/src/main/resources/template/simple/checkboxlist.ftl b/core/src/main/resources/template/simple/checkboxlist.ftl
index ba04196..3ce8686 100644
--- a/core/src/main/resources/template/simple/checkboxlist.ftl
+++ b/core/src/main/resources/template/simple/checkboxlist.ftl
@@ -56,8 +56,12 @@
         </#if>
     </#if>
     <#assign itemKeyStr=itemKey.toString() />
-<input type="checkbox" name="${parameters.name?html}" value="${itemKeyStr?html}"
+<input type="checkbox" name="${parameters.name?html}" value="${itemKeyStr?html}"<#rt/>
+    <#if parameters.id??>
+       id="${parameters.id?html}-${itemCount}"<#rt/>
+    <#else>
        id="${parameters.name?html}-${itemCount}"<#rt/>
+    </#if>
     <#if tag.contains(parameters.nameValue, itemKey)>
        checked="checked"<#rt/>
     </#if>
@@ -90,7 +94,13 @@
     <#include "/${parameters.templateDir}/${parameters.expandTheme}/common-attributes.ftl"
/>
     <#include "/${parameters.templateDir}/${parameters.expandTheme}/dynamic-attributes.ftl"
/>
         />
-<label for="${parameters.name?html}-${itemCount}" class="checkboxLabel">${itemValue?html}</label>
+<label<#rt/> 
+    <#if parameters.id??>
+        for="${parameters.id?html}-${itemCount}"<#rt/>
+    <#else>
+        for="${parameters.name?html}-${itemCount}"<#rt/>
+    </#if>
+        class="checkboxLabel">${itemValue?html}</label>
 </@s.iterator>
     <#else>
     &nbsp;


Mime
View raw message