Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-624

selectOneMenu calls converter getAsString() with String value instead of object

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1.0
    • None
    • General
    • None

    Description

      We use a SelectOneMenu to set a City object on a Person. City's are records in our DB with a Long primary key we use as value in the select. A Converter converts the PK to objects with getAsObject (getAsString simply return the PK from the object). We have seen indeed that the getAsObject is called on submit, then followed by a getAsString during the render phase BUT WITH the Long PK as THE VALUE. The component is asking to convert the String value into the String value!

      What is particularly weird is that, in the previous request/response phase, the select renders ok, which also requires a getAsString of course.

      To be sure, we switched back to the nightly we were using before (20050821), and the select worked ok again. So, as far as we are concerned, this is a serious bug, at least in SelectOneMenu!. We also tried to workaround the issue, checking in the converter if the "value" argument for getAsString is a String, and then just returning it, but that didn't work either.

      Attachments

        Issue Links

          Activity

            People

              mbroekelmann Mathias Broekelmann
              jandockx Jan Dockx
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: