On Wed, May 22, 2013 at 1:46 PM, Sven Meier <s...@meiers.net> wrote:

> I still think we can change the default value for 'allowDefault' to true.
>> Can you think of a bad scenario when this will break ?
>>
>
> I'm not sure, but it will surely break somewhere.
>
> For 6.x I'd just restore AjaxFormValidatingBehavior's functionality with
> allowDefault=true iff a throttle is given. This could be done in 6.9.0, a
> workaround for 6.8.0 exists by copying the #addToAllFormComponents() method.
>
> All developers using throttlingSettings in their own behaviors will have
> to set allowDefault=true for themselves to restore the old behavior.
>
> For 7.0.0 we could rename the setting to "preventDefault" (as in jquery)
> with "false" as default value.
>

There was a reason why I named it 'allowDefault' but I don't remember it
now.
I'll make a ticket for 7.0.0


>
> Sven
>
>
>
>
> On 05/22/2013 12:30 PM, Martin Grigorov wrote:
>
>> Ouch!
>> You are correct!
>> It is the same behavior in 6.7.0 and 6.6.0.
>> So, I agree that there is no need of 6.8.1.
>>
>>
>> I still think we can change the default value for 'allowDefault' to true.
>> Can you think of a bad scenario when this will break ?
>> Since there are no user complaints I'm not keen to do the change neither
>> in
>> 6.x nor in 7.0.0 but I think the change is a good improvement.
>>
>>
>> On Wed, May 22, 2013 at 1:11 PM, Sven Meier <s...@meiers.net> wrote:
>>
>>  It's been that way ever since:
>>>
>>> "keydown" with allowDefault=false -> not character input
>>>
>>> Sven
>>>
>>>
>>> On 05/22/2013 12:07 PM, Martin Grigorov wrote:
>>>
>>>  The quickstart in the ticket is very simple, there is no usage of
>>>> throttling.
>>>> It's just:
>>>>
>>>> textField.add(new AjaxEventBehavior("keydown") {
>>>>    @Override
>>>> protected void onEvent(AjaxRequestTarget target) {
>>>> System.err.println("event");
>>>>    }
>>>> });
>>>>
>>>> Without explicitly allowing the default behavior the user cannot enter a
>>>> single character in the <input type=text>.
>>>>
>>>>
>>>> On Wed, May 22, 2013 at 1:01 PM, Sven Meier <s...@meiers.net> wrote:
>>>>
>>>>   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<https://issues.apache.org/****jira/browse/WICKET-5194>
>>>>>> <https:**//issues.apache.org/**jira/**browse/WICKET-5194<https://issues.apache.org/**jira/browse/WICKET-5194>
>>>>>> >
>>>>>> <https:**//issues.apache.org/**jira/**browse/WICKET-5194<http://issues.apache.org/jira/**browse/WICKET-5194>
>>>>>> <http**s://issues.apache.org/jira/**browse/WICKET-5194<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=**<https://git-wip-us.apache.org/****repos/asf/wicket/repo?p=**>
>>>>>> **<https://git-wip-us.apache.**org/**repos/asf/wicket/repo?p=****<https://git-wip-us.apache.org/**repos/asf/wicket/repo?p=**>
>>>>>> >
>>>>>> wicket.git;a=commitdiff;h=******a11ce8a7e3b575385d8f03db621305****
>>>>>> **17a2b80d09<https://git-wip-****us.apache.org/repos/asf/**
>>>>>> wicket/repo?p=wicket.git;a=****commitdiff;h=**
>>>>>>
>>>>>> a11ce8a7e3b575385d8f03db621305****17a2b80d09<https://git-wip-**
>>>>>> us.apache.org/repos/asf/**wicket/repo?p=wicket.git;a=**commitdiff;h=*
>>>>>> *a11ce8a7e3b575385d8f03db621305**17a2b80d09<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=**<https://git-wip-us.apache.org/****repos/asf/wicket/repo?p=**>
>>>>>> **<https://git-wip-us.apache.**org/**repos/asf/wicket/repo?p=****<https://git-wip-us.apache.org/**repos/asf/wicket/repo?p=**>
>>>>>> >
>>>>>> wicket.git;a=commitdiff;h=******6eec04b135a60c31fac7b74b866d9f****
>>>>>> **dcc862ef30<https://git-wip-****us.apache.org/repos/asf/**
>>>>>> wicket/repo?p=wicket.git;a=****commitdiff;h=**
>>>>>>
>>>>>> 6eec04b135a60c31fac7b74b866d9f****dcc862ef30<https://git-wip-**
>>>>>> us.apache.org/repos/asf/**wicket/repo?p=wicket.git;a=**commitdiff;h=*
>>>>>> *6eec04b135a60c31fac7b74b866d9f**dcc862ef30<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 ?
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>

Reply via email to