You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Sven Meier (Jira)" <ji...@apache.org> on 2019/12/16 12:59:01 UTC
[jira] [Commented] (WICKET-6718)
AjaxFormChoiceComponentUpdatingBehavior uses "click" instead of "change"
[ https://issues.apache.org/jira/browse/WICKET-6718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16997260#comment-16997260 ]
Sven Meier commented on WICKET-6718:
------------------------------------
I've tried it with RadioChoicePage from wicket-examples and overriding getEvent() worked fine there.
> AjaxFormChoiceComponentUpdatingBehavior uses "click" instead of "change"
> ------------------------------------------------------------------------
>
> Key: WICKET-6718
> URL: https://issues.apache.org/jira/browse/WICKET-6718
> Project: Wicket
> Issue Type: Improvement
> Components: wicket-core
> Affects Versions: 8.6.1
> Reporter: Christian Tausendfreund
> Assignee: Sven Meier
> Priority: Minor
>
> 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!
--
This message was sent by Atlassian Jira
(v8.3.4#803005)