Github user abrin commented on a diff in the pull request:

    https://github.com/apache/struts/pull/7#discussion_r10753958
  
    --- 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 gave this a try on one of our local select templates and it doesn't seem 
like it's working. If I had to guess, it looks like the StrutsUtils doesn't see 
the locale file somehow. I tried a few things to see what was available and 
found:
    
    ```
                ${struts.getText?is_method?string }
    ```
    returns `true`.
    ```
                ${struts.getText('struts.messages.invalid.token')!"undef" }
    ```
    returns `undef`.
    
     I also tried `stack.getValue("getText('" + itemValue "')")` but that 
didn't work either.
    
    separately, if this get's accepted, the doc would need to be updated, 
where's the right place to adjust the documentation for this too, is it 
automatically generated, or more manual?


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to