myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Übelacker (JIRA) <...@myfaces.apache.org>
Subject [jira] Commented: (TRINIDAD-1513) SimpleSelectOneRenderer _convertIndexedSubmittedValue must not convert indexed item
Date Mon, 26 Apr 2010 16:15:32 GMT

    [ 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.


Mime
View raw message