ok, that was already implemented: * public void renderHead(IHeaderResponse response){ super.renderHead(response); WebRequest request = (WebRequest) RequestCycle.get().getRequest(); if (!stopped && (!headRendered || !request.isAjax())) { headRendered = true; response.renderOnLoadJavascript(getJsTimeoutCall(updateInterval)); } } *
(btw, I tried with response.renderOnDomReady) I also tried making the #respond method just do target.add(getComponent()) But my problem is that in each response the same script that was first loaded is also returned back in the evaluate block, which rewrites the interval variable and also makes the response much heavier (in my case the requests are very frequent) I traced my issue to #AjaxRequestTarget.respond and the following piece of code makes sure that the js passed to response.renderOnDomReady in my #renderHead will always be returned back in the response: * it = domReadyJavascripts.iterator(); while (it.hasNext()) String js = it.next(); respondInvocation(response, js); } * Any ideas are appreciated. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AbstractAjaxTimerBehavior-and-setInterval-and-clearInterval-tp4657268p4657282.html Sent from the Users forum 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