Actually wicket-ajax.js is smart enough to fire these "dom ready" events
after an ajax request.

Of course, a jQuery $(document).ready() will not fire; neither will the
"ready" events of other various JS libraries. However if you specifically
use Wicket's "dom ready" event (i.e. renderOnDomReadyJavascript() as in the
Java example below, or manually in JavaScript using
Wicket.Event.addDomReadyEvent()), then the event will fire after the ajax
call.


jthomerson wrote:
> 
> Won't work on an ajax request because the dom ready event isn't fired.
> Right?
> 
> --
> Jeremy Thomerson
> http://www.wickettraining.com
> 
> 
> 
> On Wed, Nov 11, 2009 at 2:23 AM, svenmeier <s...@meiers.net> wrote:
> 
>>
>> Why so complicated?
>>
>> @Override
>> public void renderHead(IHeaderResponse response) {
>>     response.renderOnDomReadyJavascript(init_slider_js());
>> }
>>
> 
> 

-- 
View this message in context: 
http://old.nabble.com/correct-way-to-call-necessary-javascript-initialization-when-a--component-is-added-via-ajax-tp26295973p26307595.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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

Reply via email to