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

AjaxFormChoiceComponentUpdatingBehavior uses "click" instead of "change"

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 8.6.1
    • 9.0.0-M4
    • wicket-core
    • None

    Description

      When using the AjaxFormChoiceComponentUpdatingBehavior on a RadioGroup or a RadioChoice my expectation is that the onUpdateChoice callback is only triggered if there is a change of the selected radio button. But it also triggers if you click the already selected radio button again. This is because the AjaxFormChoiceComponentUpdatingBehavior listens to the "click" event.

      To fix this I've built my own AjaxFormChoiceComponentUpdatingBehavior which listens to the "change" event. This works as expected and only triggers on a change of the selected button.

      To fix this issue, could you please change the event string in AjaxFormChoiceComponentUpdatingBehavior from "click" to "change" or provide a 2nd constructor with the event string as parameter? Thanks!

      Attachments

        Issue Links

          Activity

            People

              svenmeier Sven Meier
              ctausendfreund Christian Tausendfreund
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: