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

AjaxFormComponentUpdatingBehavior should not clear the rawInput when updateModel is false

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.16.0
    • Fix Version/s: 7.0.0-M3, 6.17.0
    • Component/s: wicket
    • Labels:

      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: