This will cause quite some trouble for the application I'm currently developing.

Example:
we have a Behavior that puts "input hints" on several textfields (e.g. 
dd/mm/yyyy for day input fields). The Behavior provides a JS file in which we 
register for the "submit" event of the containing form and thus assure that 
input hints are removed on form submit. For this implementation it's crucial 
that the JS is executed before any 'onsubmit' handler provided by Wicket. Also, 
we remove/restore input hints 'onblur' of the textfield, which also has an 
AjaxFormComponentUpdatingBehavior("onblur"). Here it's also crucial that "our" 
code is executed before Wicket's (which will ajax post the values).

Just an example in our applications, but maybe worth considering as others 
might have similar implementations for other usecases. Sure, many things can be 
handled by AjaxCallDecorator, but not all ;-)

Cheers,
   -Tom



Martin Grigorov wrote:

> Hi,
>  
> The new code registers listeners with jQuery's on() method which uses
> internally addEventListener() (IE9 and others) and attachEvent() (IE8
> and less).
> So you need to execute your JS code after Wicket's.
> Wicket executes its bindings when the DOM is ready, so you must be
> careful that your Mootools code is run after Wicket's.
> Better try with a simple app and see how it behaves.
>  
> On Mon, Jan 30, 2012 at 5:49 PM, Thomas Götz <[email protected] 
> (mailto:[email protected])> wrote:
> > Just a thought about the upcoming changes to Wicket's Javascript event 
> > registration mechanism in Wicket 6.0 (instead of inline JS events):
> >  
> > we have several Behaviors that provide Javascript in which we register to 
> > JS events, e.g. 'onblur'. Now I have a Component that additionally has an 
> > AjaxEventBehavior("onblur"). Currently, the Behaviors that registered to 
> > 'onblur' are guaranteed to execute before the inline 'onblur' event 
> > (provided by the AjaxEventBehavior). Could this be a problem with Wicket 
> > 6.0? Meaning: will it still be possible to provide additional Behaviors 
> > that register JS events that execute *before* any event behavior already 
> > registered to some Component? Or how will Wicket's JS event mechanism 
> > figure out the order of Behaviors?
> >  
> > Cheers,
> >   -Tom
> >  
>  
>  
>  
>  
> --  
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>  
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected] 
> (mailto:[email protected])
> For additional commands, e-mail: [email protected] 
> (mailto:[email protected])
>  
>  


Reply via email to