[
https://issues.apache.org/jira/browse/MYFACES-2418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12782266#action_12782266
]
Leonardo Uribe commented on MYFACES-2418:
-----------------------------------------
I applied the patch but still there are two problems. It seems the new
algorithm described in UISelectMany spec javadoc for (... the Renderer for this
component must perform the following logic for getConvertedValue().... ) do
something not documented but very helpful.
If you have a bean with a method like this:
public Object getSomeFieldValue()
{
.....
}
and you have something like
<h:selectManyXXX value="#{bean.someFieldValue}"/>
and when the view is rendered first this method returns null, no conversion is
done. Myfaces throws an exception since the return value is not an array or
collection.
The second problem is when you have something like this
public List<Integer> getSomeFieldValue()
{
.....
}
In this case, ri works but myfaces fails when try to convert the value. In
other words, the algorithm should detect the type and use the proper converter
retrieved from target class (in this case Integer).
Since the documentation is poor in this case (and maybe wrong!), but the
functionality is obviously wanted, on myfaces side we should do the same,
testing different cases on ri and fixing the algorithm. Note this two cases are
tested by TCK test.
The only mention about the intention of this stuff is here:
https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=230
> Implement h:selectManyXXX collectionType and hideNoSelectionOption
> ------------------------------------------------------------------
>
> Key: MYFACES-2418
> URL: https://issues.apache.org/jira/browse/MYFACES-2418
> Project: MyFaces Core
> Issue Type: Task
> Components: JSR-314
> Reporter: Leonardo Uribe
> Attachments: myfaces-2418.patch
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.