On Wed, May 22, 2013 at 10:04 AM, Martin Grigorov <mgrigo...@apache.org>wrote:

> Hi,
>
> I think we need 6.8.1 because of the problem in
> https://issues.apache.org/jira/browse/WICKET-5194.
>  The quickstart shows that textField.add(new AjaxEventBehavior("keydown"))
> doesn't work because the event' default behavior is prevented.
>
> org.apache.wicket.ajax.attributes.AjaxRequestAttributes#allowDefault
> default value was 'false' since 6.0.0 but it seems it was not used at all
> in many cases before the changes in WICKET-5093:
>
>
> https://git-wip-us.apache.org/repos/asf/wicket/repo?p=wicket.git;a=commitdiff;h=a11ce8a7e3b575385d8f03db62130517a2b80d09
>
> https://git-wip-us.apache.org/repos/asf/wicket/repo?p=wicket.git;a=commitdiff;h=6eec04b135a60c31fac7b74b866d9fdcc862ef30
>
> I suggest to change the default value of 'allowDefault' to 'true'.
>
> Do you see any use cases where the value should be 'false' ?
> The 'false' value was because AjaxFallbackLink should not execute it
> default behavior - following its href location. But here really the
> effective JS event property is 'stopPropagation' which has been extracted
> to its own property in AjaxRequestAttributes.
>

Correction:
AjaxFallback*** should do setAllowDefault(false).

I'll attach a patch to the ticket soon.


>
> A workaround is to use:
>
> getAjaxRequestTargetListeners().add(new
> AjaxRequestTarget.AbstractListener()
> {
>  @Override
> public void updateAjaxAttributes(AjaxRequestAttributes attributes)
> {
>  super.updateAjaxAttributes(attributes);
>
> attributes.setAllowDefault(true);
> }
>  });
>
> in YourApp#init(). But we cannot ask all users to do this until 6.9.0 is
> released.
>
> What do you think ? Should we fix this and release 6.8.1 as soon as
> possible ?
>

Reply via email to