You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by jo...@apache.org on 2012/07/29 22:10:07 UTC

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

Author: jogep
Date: Sun Jul 29 20:10:06 2012
New Revision: 1366934

URL: http://svn.apache.org/viewvc?rev=1366934&view=rev
Log:
WW-3846 Add a new attributes for optionsCollection

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=1366934&r1=1366933&r2=1366934&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 Sun Jul 29 20:10:06 2012
@@ -34,6 +34,27 @@
         <#else>
             <#assign itemValue = stack.findString('top')/>
     </#if>
+    <#if parameters.listCssClass??>
+        <#if stack.findString(parameters.listCssClass)??>
+          <#assign itemCssClass= stack.findString(parameters.listCssClass)/>
+        <#else>
+          <#assign itemCssClass = ''/>
+        </#if>
+    </#if>
+    <#if parameters.listCssStyle??>
+        <#if stack.findString(parameters.listCssStyle)??>
+          <#assign itemCssStyle= stack.findString(parameters.listCssStyle)/>
+        <#else>
+          <#assign itemCssStyle = ''/>
+        </#if>
+    </#if>
+    <#if parameters.listTitle??>
+        <#if stack.findString(parameters.listTitle)??>
+          <#assign itemTitle= stack.findString(parameters.listTitle)/>
+        <#else>
+          <#assign itemTitle = ''/>
+        </#if>
+    </#if>
     <#assign itemKeyStr=itemKey.toString() />
 <input type="checkbox" name="${parameters.name?html}" value="${itemKeyStr?html}"
        id="${parameters.name?html}-${itemCount}"<#rt/>
@@ -43,8 +64,26 @@
     <#if parameters.disabled?default(false)>
        disabled="disabled"<#rt/>
     </#if>
-    <#if parameters.title??>
-       title="${parameters.title?html}"<#rt/>
+    <#if itemCssClass?if_exists != "">
+     class="${itemCssClass?html}"<#rt/>
+    <#else>
+        <#if parameters.cssClass??>
+     class="${parameters.cssClass?html}"<#rt/>
+        </#if>
+    </#if>
+    <#if itemCssStyle?if_exists != "">
+     style="${itemCssStyle?html}"<#rt/>
+    <#else>
+        <#if parameters.cssStyle??>
+     style="${parameters.cssStyle?html}"<#rt/>
+        </#if>
+    </#if>
+    <#if itemTitle?if_exists != "">
+     title="${itemTitle?html}"<#rt/>
+    <#else>
+        <#if parameters.title??>
+     title="${parameters.title?html}"<#rt/>
+        </#if>
     </#if>
     <#include "/${parameters.templateDir}/simple/css.ftl" />
     <#include "/${parameters.templateDir}/simple/scripting-events.ftl" />