Return-Path: X-Original-To: apmail-struts-commits-archive@minotaur.apache.org Delivered-To: apmail-struts-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F0A5C10C8D for ; Sun, 30 Mar 2014 07:46:12 +0000 (UTC) Received: (qmail 14191 invoked by uid 500); 30 Mar 2014 07:46:12 -0000 Delivered-To: apmail-struts-commits-archive@struts.apache.org Received: (qmail 13890 invoked by uid 500); 30 Mar 2014 07:46:04 -0000 Mailing-List: contact commits-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list commits@struts.apache.org Received: (qmail 12955 invoked by uid 99); 30 Mar 2014 07:46:01 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 30 Mar 2014 07:46:01 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id E3F9A838D32; Sun, 30 Mar 2014 07:46:00 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: lukaszlenart@apache.org To: commits@struts.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: git commit: WW-4313 Uses name instead of id if the other isn't set Date: Sun, 30 Mar 2014 07:46:00 +0000 (UTC) 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 Authored: Sun Mar 30 09:45:45 2014 +0200 Committer: Lukasz Lenart 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 @@ <#assign itemKeyStr=itemKey.toString() /> - + <#if parameters.id??> + id="${parameters.id?html}-${itemCount}"<#rt/> + <#else> id="${parameters.name?html}-${itemCount}"<#rt/> + <#if tag.contains(parameters.nameValue, itemKey)> checked="checked"<#rt/> @@ -90,7 +94,13 @@ <#include "/${parameters.templateDir}/${parameters.expandTheme}/common-attributes.ftl" /> <#include "/${parameters.templateDir}/${parameters.expandTheme}/dynamic-attributes.ftl" /> /> - + + <#if parameters.id??> + for="${parameters.id?html}-${itemCount}"<#rt/> + <#else> + for="${parameters.name?html}-${itemCount}"<#rt/> + + class="checkboxLabel">${itemValue?html} <#else>