Wicket
  1. Wicket
  2. WICKET-5230

AjaxFormChoiceComponentUpdatingBehavior fails for choices containing other invalid FormComponents

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.10, 6.8.0, 7.0.0
    • Fix Version/s: 6.9.0, 1.5.11, 7.0.0
    • Component/s: wicket
    • Labels:
      None

      Description

      If a TextField inside a RadioGroup has a ValidationError, processing of AjaxFormChoiceComponentUpdatingBehavior will erroneously update the group's model:

      • RadioGroup#validate() does not convert the input, because #isValid() returns false (since the nested textfield has an error message)
      • the behavior tests #hasErrorMessage() on the group, which returns false (since the group itself doesn't have an error message)
      • the behavior continues processing with a null value

        Activity

        Hide
        Sven Meier added a comment -

        #isValid() is now used instead of #hasErrorMessage() for cases where a nested FormComponent might have an error message. This is how FormComponent does it too.

        Show
        Sven Meier added a comment - #isValid() is now used instead of #hasErrorMessage() for cases where a nested FormComponent might have an error message. This is how FormComponent does it too.

          People

          • Assignee:
            Sven Meier
            Reporter:
            Sven Meier
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development