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

AjaxFormChoiceComponentUpdatingBehavior uses "click" instead of "change"

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 8.6.1
    • Fix Version/s: 9.0.0-M4
    • Component/s: wicket-core
    • Labels:
      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

            • Assignee:
              svenmeier Sven Meier
              Reporter:
              ctausendfreund Christian Tausendfreund

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment