You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "David Übelacker (JIRA)" <de...@myfaces.apache.org> on 2010/04/26 18:15:32 UTC
[jira] Commented: (TRINIDAD-1513) SimpleSelectOneRenderer
_convertIndexedSubmittedValue must not convert indexed item
[ https://issues.apache.org/jira/browse/TRINIDAD-1513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12860974#action_12860974 ]
David Übelacker commented on TRINIDAD-1513:
-------------------------------------------
Have the same issue with 1.2.13 after updating from 1.2.1
> SimpleSelectOneRenderer _convertIndexedSubmittedValue must not convert indexed item
> -----------------------------------------------------------------------------------
>
> Key: TRINIDAD-1513
> URL: https://issues.apache.org/jira/browse/TRINIDAD-1513
> Project: MyFaces Trinidad
> Issue Type: Bug
> Affects Versions: 1.2.11-core
> Reporter: Bernhard Seebass
> Original Estimate: 0.03h
> Remaining Estimate: 0.03h
>
> The method SimpleSelectOneRenderer._convertIndexedSubmittedValue(), which is used when valuePassThru is false, tries to convert the stored object using the following code:
> ...
> SelectItem item = selectItems.get(index);
> if (item != null)
> {
> Object converted = item.getValue();
> if (converter != null && converted != null)
> {
> converted = converter.getAsObject(context, component, converted.toString());
> }
> return converted;
> }
> ...
> Actually the converted object recieved by item.getValue() is exactly what is needed, whereas there is no reason to assume that converted.toString() produces anything useful.
> So the obvious fix would be:
> ...
> SelectItem item = selectItems.get(index);
> if (item != null)
> {
> return item.getValue();
> }
> ...
> Any objections?
> Regards,
> Bernhard
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.