rasyahadlinugraha / wiquery

Automatically exported from code.google.com/p/wiquery
MIT License
0 stars 0 forks source link

window on load for ajax behaviors added to AjaxRequestTarget not triggered #214

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I'm adding AjaxTimerBehaviors to the AJAX response, but these behaviors are 
never triggered. As I understand WiQuery contributes the following to the head:

<script id="1779259180" src_="undefined" type="text/javascript">
try{
/*<![CDATA[*/
Wicket.Event.add(window, "load", function(event) { setTimeout("var 
wcall=wicketAjaxGet('index?2-1.IBehaviorListener.0-myPanel',function() { 
}.bind(this),function() { }.bind(this), function() {var c = 
Wicket.$('myPanel18'); return typeof(c) != 'undefined' && c != 
null}.bind(this));", 5000);;});
/*]]>*/
}catch(e){WicketAjaxDebug.logError(e);}
</script>

This is because AbstractAjaxTimerBehavior calls: 
response.renderOnLoadJavaScript(getJsTimeoutCall(updateInterval));

If I subclass AbstractAjaxTimerBehavior and change it to domready instead of 
load:

response.renderOnDomReadyJavaScript(getJsTimeoutCall(updateInterval));

everything works fine.

Emil

Original issue reported on code.google.com by emil.ber...@gmail.com on 4 Oct 2011 at 12:51

GoogleCodeExporter commented 9 years ago
Hi Emil,

Wicket and Wiquery have a bug where not all ajax contributions are handled 
properly. It should be fixed when using wiquery 1.5.1 with wicket 1.5.1.

Hielke

Original comment by hielke.hoeve on 4 Oct 2011 at 1:56

GoogleCodeExporter commented 9 years ago

Original comment by hielke.hoeve on 26 Oct 2011 at 7:06