struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlenart <...@git.apache.org>
Subject [GitHub] struts pull request: [PATCH] First attempt at enabling value-label...
Date Wed, 19 Mar 2014 20:22:21 GMT
Github user lukaszlenart commented on a diff in the pull request:

    https://github.com/apache/struts/pull/7#discussion_r10769526
  
    --- Diff: core/src/main/resources/template/simple/checkboxlist.ftl ---
    @@ -29,7 +29,13 @@
             <#else>
                 <#assign itemKey = stack.findValue('top')/>
         </#if>
    -    <#if parameters.listValue??>
    +  <#if parameters.listValueKey??>
    +    <#-- 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 -->
    --- End diff --
    
    I have tested this as a standalone Freemarker result and it works
    
        <#assign itemValue = struts.getText('username') />
        <p>username = ${itemValue}</p>
        <p>username = ${struts.getText('username')}</p>


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message