You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Musachy Barroso (JIRA)" <ji...@apache.org> on 2008/05/23 22:34:05 UTC
[jira] Commented: (WW-2223) listKey and listValue cannot be left
out in a <@s.select> which is part of a freemarker template (contrary to
the JSP tag )
[ https://issues.apache.org/struts/browse/WW-2223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43940#action_43940 ]
Musachy Barroso commented on WW-2223:
-------------------------------------
Are you still having this problem? I tried to replicate it, but it seems to work, here is my component:
under /components/html/select2.ftl
<@s.select name="name" value="%{parameters.value}" required="true" theme="simple" templateDir="template" list=r'#{"EUR":"EUR", "USD":"USD", "GBP":"GBP"}'
/>
And a jsp using it:
<s:component templateDir="components" theme="html" template="select2.ftl">
<s:param name="value" value="%{'USD'}"/>
</s:component>
The value gets selected as expected. If you can still replicated, please submit a test case with just static data, like this one. (and re-open the ticket)
> listKey and listValue cannot be left out in a <@s.select> which is part of a freemarker template (contrary to the JSP tag <s:select>)
> -------------------------------------------------------------------------------------------------------------------------------------
>
> Key: WW-2223
> URL: https://issues.apache.org/struts/browse/WW-2223
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - Tags
> Reporter: Kris Coolsaet
> Fix For: 2.1.3
>
>
> If you use a <@s.select ..> as part of a freemarker template to be called by the <s:component ...> tag, using a hashmap
> as the value for the 'list' attribute does not work, unless you also explicitely set 'listKey' equal to 'key' and listValue' to 'value'.
> This is very confusing, as this is not needed in the case of the JSP tag <s:select ...> .
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.