You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2014/06/06 11:07:02 UTC

[jira] [Commented] (WICKET-5613) Add AjaxEventBehavior to Component Check

    [ https://issues.apache.org/jira/browse/WICKET-5613?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14019699#comment-14019699 ] 

Martin Grigorov commented on WICKET-5613:
-----------------------------------------

I haven't checked the attached quickstart but I guess the problem is with org.apache.wicket.ajax.attributes.AjaxRequestAttributes#setAllowDefault
Override AjaxEventBehavior#updateAjaxAttributes() and set it to true.

We know about this issue but since it changes the behavior so dramatically we cannot fix it in 6.x.
It is fixed in Wicket 7.x - the event's default behavior is not prevent by default (as in the browser) and the event propagates/bubbles by default.

> Add AjaxEventBehavior to Component Check
> ----------------------------------------
>
>                 Key: WICKET-5613
>                 URL: https://issues.apache.org/jira/browse/WICKET-5613
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.15.0
>            Reporter: Martin Wischnewski
>            Priority: Minor
>         Attachments: checkbox.zip
>
>
> Following situation:
> There is only a CheckGroup with one Check Component on a Page.
> If I add an AjaxEventBehavior("click") to the Component Check, the checkbox will not be checked  on the HtmlPage anymore.
> public HomePage(final PageParameters parameters) {
>                 super(parameters);
>                 CheckGroup<Boolean> group = new CheckGroup<Boolean>("checkgroup", new ArrayList<Boolean>());
>                 add(group);
>                 Check<Boolean> check = new Check<Boolean>("check");
>                 check.add(new AjaxEventBehavior("click") {
>                         @Override
>                         protected void onEvent(AjaxRequestTarget target) {
>                         }
>                 });
>                 group.add(check);
> 	}
> I add a Quickstart  as attachment.



--
This message was sent by Atlassian JIRA
(v6.2#6252)