Wicket
  1. Wicket
  2. WICKET-3745

AbstractSingleSelectChoice tries to convert the input using the id generated by IChoiceRenderer

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.17
    • Fix Version/s: 1.5-RC5
    • Component/s: wicket
    • Labels:
      None

      Description

      If one set a type for an AbstractSingleSelectChoice component, it will start to get error because the input being converted to model type was not generated by the converter, but by the IChoiceRenderer.

      1. WICKET-3745.zip
        48 kB
        Pedro Santos
      2. WICKET-3745.patch
        1.0 kB
        Pedro Santos

        Activity

        Hide
        Igor Vaynberg added a comment -

        thought about it some more. the only clear way i see to make this better is to make settype() throw an exception when called on a component that uses an ichoicerenderer.

        Show
        Igor Vaynberg added a comment - thought about it some more. the only clear way i see to make this better is to make settype() throw an exception when called on a component that uses an ichoicerenderer.
        Hide
        Igor Vaynberg added a comment -

        hrm. what is the usecase for setting a type on a choice component? like you have mentioned - there is no type converstion that is happening here, instead it uses a simple lookup from choice renderer. if anything, we should make calling settype() on it throw an exception.

        Show
        Igor Vaynberg added a comment - hrm. what is the usecase for setting a type on a choice component? like you have mentioned - there is no type converstion that is happening here, instead it uses a simple lookup from choice renderer. if anything, we should make calling settype() on it throw an exception.
        Hide
        Pedro Santos added a comment -

        @devs, I think AbstractSingleSelectChoice needs to tweak the input to be understood by convertes ( my last patch ). I'm just not sure if this is a good idea, because we can't know for sure who will parse the input since one can override the FormComponent#convertInput method.

        Show
        Pedro Santos added a comment - @devs, I think AbstractSingleSelectChoice needs to tweak the input to be understood by convertes ( my last patch ). I'm just not sure if this is a good idea, because we can't know for sure who will parse the input since one can override the FormComponent#convertInput method.
        Hide
        Pedro Santos added a comment -

        possible fix

        Show
        Pedro Santos added a comment - possible fix
        Hide
        Pedro Santos added a comment -

        Quickstart reproducing the problem

        Show
        Pedro Santos added a comment - Quickstart reproducing the problem

          People

          • Assignee:
            Igor Vaynberg
            Reporter:
            Pedro Santos
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development