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

Regression in OnChangeAjaxBehavior

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 6.0.0-beta1
    • 6.0.0-beta2
    • wicket
    • None

    Description

      There is a regression in 6.x in OnChangeAjaxBehavior.
      This is a behavior that handles 'oninput' JavaScript event in browser portable way for text form components. In 6.x it is reimplemented with custom jQuery event 'inputchanged'.
      Now I noticed that in 1.5.x and earlier it actually behaves like simple AjaxFormComponentUpdatingBehavior("onchange") for non-text form components.

      I see two solutions:
      1) change the event to "change.inputchanged". Need to verify it but I think it will be fired when used with DropDownChoice
      2) rename it to OnInputAjaxBehavior and update its javadoc that it applies only to text components. It can even throw exceptions if used with something else. Just as AjaxFormChoiceComponentBehavior does. And explain that AjaxFormComponentUpdatingBehavior("onchange") should be used for non-text form components.

      I'm more in favour of 2).

      Attachments

        1. WICKET-4482.patch
          7 kB
          Martin Tzvetanov Grigorov

        Issue Links

          Activity

            People

              mgrigorov Martin Tzvetanov Grigorov
              mgrigorov Martin Tzvetanov Grigorov
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: