[
https://issues.apache.org/struts/browse/WW-1711?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40127
]
Stuart Piltch commented on WW-1711:
-----------------------------------
I think the tests are correctly failing. The proposed fix won't work as is,
since the nameValue may be a collection and calling ?string on the collection
causes the tag.contains() to fail.
I've reverted my local copy of select.ftl and created a new select test that
correctly fails when using a non-string type. Seems like we were missing that
failed test example. I'll attach a patch for the test.
> select tag: current option is not selected if actual value to check is no
> String (aka: nameValue resolves to type other than String)
> ------------------------------------------------------------------------------------------------------------------------------------
>
> Key: WW-1711
> URL: https://issues.apache.org/struts/browse/WW-1711
> Project: Struts 2
> Issue Type: Bug
> Components: Views
> Affects Versions: 2.0.5
> Reporter: Rene Gielen
> Assigned To: Rene Gielen
> Priority: Critical
> Fix For: 2.0.6
>
>
> If the nameValue parameter for UIBean Components resolves to types other than
> String, the correct value does not get selected.
> Example:
> <s:select label="%{getText('task.priority')}" name="task.priority.id"
> value="%{task.priority.id.toString()}" list="priorities" listKey="id"
> listValue="name" />
> If task.priority.id has type String, value gets seleted. If it a a Long (or
> whatever), it does not get selected.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.