-
1. Re: a4j:poll
ilya_shaikovsky Mar 19, 2010 12:11 PM (in response to adi.katz)1 of 1 people found this helpfuluse A4J.AJAX.OnError handler and stop poll via api http://community.jboss.org/wiki/AjaxCoreComponents#stoppolling
-
2. Re: a4j:poll
adi.katz Mar 19, 2010 2:27 PM (in response to ilya_shaikovsky)Hi,
Thanks for your reply. From some reason this still does not work for me. Here is my code:
Error catching code:
A4J.AJAX.onError = function(req, status, message){
A4J.AJAX.StopPoll('#{rich:clientId('_pulse')}');
alert('hello');
}Poll code:
<a4j:region id="_rgn_pulse">
<a4j:poll id="_pulse" immediate="true" enabled="#{initParam['easa.client.web.heartbeat']>0}" interval="5000"
reRender="_pulse" limitToList="true" action="#{easap.pulse}"/>
</a4j:region>The way I test it is by shutting down my server while the web page is active. The A4J.AJAX.onError is immediately called but it is kept being called repeatdly, as if the poll is still active...
Any suggestions ?
Thanks
Adi
-
3. Re: a4j:poll
ilya_shaikovsky Mar 22, 2010 7:35 AM (in response to adi.katz)if there are any js errors?