Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-5658

AjaxFormComponentUpdatingBehavior should not clear the rawInput when updateModel is false

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 6.16.0
    • 7.0.0-M3, 6.17.0
    • wicket

    Description

      Setup: case requires OnChangeAjaxBehavior with getUpdateModel returning false on DropDownChoice.

      Result: ajax response contain model's object, but not new value.

      Explanation: There is following lines in AjaxFormComponentUpdatingBehaviour

      formComponent.inputChanged();
      formComponent.validate();
      if (formComponent.isValid())
      {
      >>>>>>>> formComponent.valid();
      if (getUpdateModel())

      { formComponent.updateModel(); }

      onUpdate(target);
      }

      Let me note that "formComponent.valid()" is cleaning raw Input. But it's required in subsequent AbstractChoice.onComponentTagBody.

      Attachments

        Issue Links

          Activity

            People

              mgrigorov Martin Tzvetanov Grigorov
              phantom Ilia Naryzhny
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: