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 E39161174F for ; Fri, 27 Jun 2014 11:06:48 +0000 (UTC) Received: (qmail 43407 invoked by uid 500); 27 Jun 2014 11:06:47 -0000 Delivered-To: apmail-struts-commits-archive@struts.apache.org Received: (qmail 43256 invoked by uid 500); 27 Jun 2014 11:06:47 -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 43020 invoked by uid 99); 27 Jun 2014 11:06:47 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jun 2014 11:06:47 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id E0ED198D619; Fri, 27 Jun 2014 11:06:46 +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 Date: Fri, 27 Jun 2014 11:06:48 -0000 Message-Id: <149c96c24f714bfa87d9277183f53697@git.apache.org> In-Reply-To: <1822ea5ed926453c87de2ef60d5d05bd@git.apache.org> References: <1822ea5ed926453c87de2ef60d5d05bd@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [03/12] git commit: Extends template to use the new field to localise value's label Extends template to use the new field to localise value's label Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/69df8704 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/69df8704 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/69df8704 Branch: refs/heads/feature/WW-4295-localization Commit: 69df87047ab2a72c339a0ee320459757ba439f40 Parents: 9018936 Author: Lukasz Lenart Authored: Thu Mar 20 08:08:27 2014 +0100 Committer: Lukasz Lenart Committed: Thu Mar 20 08:08:27 2014 +0100 ---------------------------------------------------------------------- core/src/main/resources/template/simple/checkboxlist.ftl | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/struts/blob/69df8704/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 9662e42..e2e569c 100644 --- a/core/src/main/resources/template/simple/checkboxlist.ftl +++ b/core/src/main/resources/template/simple/checkboxlist.ftl @@ -29,16 +29,14 @@ <#else> <#assign itemKey = stack.findValue('top')/> - <#if parameters.listValueKey??> + <#if parameters.listLabelKey??> <#-- checks the valueStack for the 'valueKey.' The valueKey is then looked-up in the locale file for it's localized value. This is then used as a label --> - <#assign itemValue = stack.findString(parameters.listValueKey)/> - <#-- FIXME: find a better way to get the value than a call to @s.text --> - <#assign itemValue><@s.text name="${itemValue}"/> + <#assign itemValue = struts.getText(stack.findString(parameters.listLabelKey))/> <#elseif parameters.listValue??> <#assign itemValue = stack.findString(parameters.listValue)?default("")/> - <#else> - <#assign itemValue = stack.findString('top')/> + <#else> + <#assign itemValue = stack.findString('top')/> <#if parameters.listCssClass??> <#if stack.findString(parameters.listCssClass)??>