You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "guillaume.mary" <gu...@interview-efm.com> on 2014/12/17 11:26:13 UTC

OnChangeAjaxBehavior listened event modified in 1.6.18

Hi all,

With WICKET-5711 OnChangeAjaxBehavior now listen both "change" and
"inputchange" on TextField. Hence when you type in the TextField, the
behavior is called twice because both events are fired by the browser. It's
the same problem as WICKET-5603 but applied to TextField for all browsers
(WICKET-5603 was focused on Chrome)
>From my point of view, WICKET-5711 is a regression on simple TextFields and
I don't agree with its description : "OnChangeAjaxBehavior should use both
'inputchange" and "change" events for TextField and TextArea components."

(moreover OnChangeAjaxBehavior javadoc is not up-to-date since it's still
talking about inputchange for TextField)

My project upgraded from 1.6.16 to 1.6.18 to take benefit of CVE-2014-3526
(vulnerability issue) and uses many OnChangeAjaxBehaviors so we're quite
impacted by modifications done in this class.


After some reflection, making OnChangeAjaxBehavior handle all use cases
(simple TextField, DatePicker, Select) as it is said is the javadoc ("best
available method") would generate some complex code ...

So, is OnChangeAjaxBehavior not too dangerous ? Shouldn't it be clearly
indicated in Javadoc that AjaxFormComponentUpdatingBehavior must be prefered
to control what event is listened ?
Can we revert WICKET-5711 ?

please advice

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/OnChangeAjaxBehavior-listened-event-modified-in-1-6-18-tp4668814.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: OnChangeAjaxBehavior listened event modified in 1.6.18

Posted by Martin Grigorov <mg...@apache.org>.
'inputchange' is 'input' for non-IE browsers and cut/paste for IE

If just 'change' does the job then use
AjaxFormComponentUpdatingBehavior("change").
We have to improve the javadoc of OnChangeAjaxBehavior
On Dec 20, 2014 2:13 PM, "guillaume.mary" <gu...@interview-efm.com>
wrote:

> Hi,
>
> I agree, while typing 'change' is not fired. But 'inputchange' is. (it's an
> implementation of Wicket, its not an native browser event)
>
> So I refined my used case and my problem appears on 'number' text field,
> when the user uses the arrows to increment or decrement the value: both
> events are fired (at least on FF)
>
> Please note that JQuery is not only suffiscient since its doesn't support
> 'inpuchange', but Wicket does.
>
> I'm trying to create a JSFiddle but as I said it needs Wicket Javascript
> librairies to demonstrate and I don't have any server that can server those
> resources at the moment.
>
>
>
>
> Martin Grigorov-4 wrote
> > Hi,
> >
> > On Wed, Dec 17, 2014 at 12:26 PM, guillaume.mary <
>
> > guillaume.mary@
>
> >> wrote:
> >>
> >> Hi all,
> >>
> >> With WICKET-5711 OnChangeAjaxBehavior now listen both "change" and
> >> "inputchange" on TextField. Hence when you type in the TextField, the
> >> behavior is called twice because both events are fired by the browser.
> >> It's
> >>
> >
> > 'change' event shouldn't be fired when typing.
> > Just tried it at http://jquery.com/. In the JS console executed:
> > $('input[name=s]').change(function()
> > {console.log('BOOM')})
> > It doesn't log while typing in the search field. It logs when I leave the
> > text field.
> >
> > Which browser ? OS?
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/OnChangeAjaxBehavior-listened-event-modified-in-1-6-18-tp4668814p4668872.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: OnChangeAjaxBehavior listened event modified in 1.6.18

Posted by "guillaume.mary" <gu...@interview-efm.com>.
Hi,

I agree, while typing 'change' is not fired. But 'inputchange' is. (it's an
implementation of Wicket, its not an native browser event)

So I refined my used case and my problem appears on 'number' text field,
when the user uses the arrows to increment or decrement the value: both
events are fired (at least on FF)

Please note that JQuery is not only suffiscient since its doesn't support
'inpuchange', but Wicket does.

I'm trying to create a JSFiddle but as I said it needs Wicket Javascript
librairies to demonstrate and I don't have any server that can server those
resources at the moment.




Martin Grigorov-4 wrote
> Hi,
> 
> On Wed, Dec 17, 2014 at 12:26 PM, guillaume.mary <

> guillaume.mary@

>> wrote:
>>
>> Hi all,
>>
>> With WICKET-5711 OnChangeAjaxBehavior now listen both "change" and
>> "inputchange" on TextField. Hence when you type in the TextField, the
>> behavior is called twice because both events are fired by the browser.
>> It's
>>
> 
> 'change' event shouldn't be fired when typing.
> Just tried it at http://jquery.com/. In the JS console executed:
> $('input[name=s]').change(function()
> {console.log('BOOM')})
> It doesn't log while typing in the search field. It logs when I leave the
> text field.
> 
> Which browser ? OS?



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/OnChangeAjaxBehavior-listened-event-modified-in-1-6-18-tp4668814p4668872.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: OnChangeAjaxBehavior listened event modified in 1.6.18

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

On Wed, Dec 17, 2014 at 12:26 PM, guillaume.mary <
guillaume.mary@interview-efm.com> wrote:
>
> Hi all,
>
> With WICKET-5711 OnChangeAjaxBehavior now listen both "change" and
> "inputchange" on TextField. Hence when you type in the TextField, the
> behavior is called twice because both events are fired by the browser. It's
>

'change' event shouldn't be fired when typing.
Just tried it at http://jquery.com/. In the JS console executed:
$('input[name=s]').change(function()
{console.log('BOOM')})
It doesn't log while typing in the search field. It logs when I leave the
text field.

Which browser ? OS?


> the same problem as WICKET-5603 but applied to TextField for all browsers
> (WICKET-5603 was focused on Chrome)
> From my point of view, WICKET-5711 is a regression on simple TextFields and
> I don't agree with its description : "OnChangeAjaxBehavior should use both
> 'inputchange" and "change" events for TextField and TextArea components."
>
> (moreover OnChangeAjaxBehavior javadoc is not up-to-date since it's still
> talking about inputchange for TextField)
>
> My project upgraded from 1.6.16 to 1.6.18 to take benefit of CVE-2014-3526
> (vulnerability issue) and uses many OnChangeAjaxBehaviors so we're quite
> impacted by modifications done in this class.
>
>
> After some reflection, making OnChangeAjaxBehavior handle all use cases
> (simple TextField, DatePicker, Select) as it is said is the javadoc ("best
> available method") would generate some complex code ...
>
> So, is OnChangeAjaxBehavior not too dangerous ? Shouldn't it be clearly
> indicated in Javadoc that AjaxFormComponentUpdatingBehavior must be
> prefered
> to control what event is listened ?
> Can we revert WICKET-5711 ?
>
> please advice
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/OnChangeAjaxBehavior-listened-event-modified-in-1-6-18-tp4668814.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>