You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Thomas Andraschko (Jira)" <de...@myfaces.apache.org> on 2024/01/04 09:37:00 UTC

[jira] [Resolved] (MYFACES-4645) Conversion error for select items of type String

     [ https://issues.apache.org/jira/browse/MYFACES-4645?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Andraschko resolved MYFACES-4645.
----------------------------------------
      Assignee: Thomas Andraschko
    Resolution: Fixed

> Conversion error for select items of type String
> ------------------------------------------------
>
>                 Key: MYFACES-4645
>                 URL: https://issues.apache.org/jira/browse/MYFACES-4645
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 4.0.1
>            Reporter: Manuel K
>            Assignee: Thomas Andraschko
>            Priority: Major
>             Fix For: 4.0.2, 4.1.0, 5.0.0
>
>         Attachments: image-2023-12-04-13-30-22-019.png, primefaces-test-duplicate-conversion-error.zip
>
>
> An error occurs when using select items of type String in combination with the OmniFaces SelectItemsIndexConverter. MyFaces seems to attempt to convert the submitted value twice, which leads to a NumberFormatException on the second try.
> I suspect the following if-statement in _org.apache.myfaces.core.api.shared.SelectItemsUtil_ to be the culprit, but of course have no idea why it is needed in other cases or how to fix the problem:
> !image-2023-12-04-13-30-22-019.png!
> Please see the attached reproducer, which produces the error when selecting a value in the SelectOneMenu when run with 
> {noformat}
> mvn clean jetty:run -Pmyfaces40{noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)