AFAICS this is a problem only for behaviors which are throttled.
AjaxFormValidatingBehavior is the only one in Wicket, we can simple set
allowDefault=true for that one. And I don't think this is so urgent to
require a 6.8.1 release.
Anyone else using ThrottlingSettings can easily set allowDefault=true in
their own behavior.
Changing the default for allowDefault might break many other places in
user's code :(.
Sven
On 05/22/2013 09:04 AM, Martin Grigorov 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.
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 ?