Return-Path: X-Original-To: apmail-struts-issues-archive@minotaur.apache.org Delivered-To: apmail-struts-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2E490E0C0 for ; Tue, 22 Jan 2013 00:36:16 +0000 (UTC) Received: (qmail 83980 invoked by uid 500); 22 Jan 2013 00:36:15 -0000 Delivered-To: apmail-struts-issues-archive@struts.apache.org Received: (qmail 83904 invoked by uid 500); 22 Jan 2013 00:36:15 -0000 Mailing-List: contact issues-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 issues@struts.apache.org Received: (qmail 83865 invoked by uid 99); 22 Jan 2013 00:36:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Jan 2013 00:36:15 +0000 Date: Tue, 22 Jan 2013 00:36:15 +0000 (UTC) From: "Hudson (JIRA)" To: issues@struts.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (WW-3919) Checkboxlist does not render label tag correctly MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/WW-3919?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13559239#comment-13559239 ] Hudson commented on WW-3919: ---------------------------- Integrated in Struts2-JDK6 #623 (See [https://builds.apache.org/job/Struts2-JDK6/623/]) WW-3919 adds proper logic to render id attribute (Revision 1436660) Result = SUCCESS lukaszlenart : Files : * /struts/struts2/trunk/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/simple/CheckboxListHandler.java > Checkboxlist does not render label tag correctly > ------------------------------------------------ > > Key: WW-3919 > URL: https://issues.apache.org/jira/browse/WW-3919 > Project: Struts 2 > Issue Type: Bug > Components: Plugin - Java Templates > Reporter: Greg Huber > Assignee: Lukasz Lenart > Priority: Minor > Fix For: 2.3.9 > > > Hello, > Here are the mods to get the label working! > {code:java} > //Checkbox button section > Attributes a = new Attributes(); > a.add("type", "checkbox") > .add("name", name) > .add("value", itemKeyStr) > .addIfTrue("checked", checked) > .addIfTrue("readonly", params.get("readonly")) > .addIfTrue("disabled", disabled) > .addIfExists("tabindex", params.get("tabindex")) > //.addIfExists("id", name + "-" + Integer.toString(cnt++)); > .addIfExists("id", id + "-" + Integer.toString(cnt)); << CHANGED > start("input", a); > end("input"); > //Label section > a = new Attributes(); > //a.add("for",id); > a.add("for",id + "-" + Integer.toString(cnt)) << CHANGED > .addIfExists("class", params.get("cssClass")) > .addIfExists("style", params.get("cssStyle")); > super.start("label", a); > if (StringUtils.isNotEmpty(itemValueStr)) > characters(itemValueStr); > super.end("label"); > //Hidden input section > a = new Attributes(); > a.add("type", "hidden") > .add("id", "__multiselect_" + StringUtils.defaultString(StringEscapeUtils.escapeHtml4(id))) > .add("name", "__multiselect_" + StringUtils.defaultString(StringEscapeUtils.escapeHtml4(name))) > .add("value", "") > .addIfTrue("disabled", disabled); > start("input", a); > end("input"); > super.end("br"); > stack.pop(); > > cnt++; // Increment <<< ADDED > {code} > Cheers Greg -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira