However, I'm actually wondering whether you really always need to run this background polling. If requests are always answered within the timeout interval (which is set to 100 seconds), that mechanism should be never needed. For instance, in the "AjaxSuggest" example, it will be surely not needed. You will only need it if you have long-running queries or computations where getting the result is crucial. So I was wondering whether AjaxPage should provide a parameter that allows disabling and enabling the polling mechanism. In the AjaxSuggest example, I would like to disable it from the beginning.

Instead of turning the polling off, would setting the client polling interval to some big number be good enough? I added an ajax_clientPollingInterval to AjaxPage so that a child page can easily set the polling interval (long if it doesn't need it, short if it does).

Also I added an auto_connect flag to the javascript that will prevent the client from connecting to ajax_response on the server at all. It could be set to false for a site that would never need the ajax_response mechanism.

There are two uses I can see for ajax_response. One is for long running requests (in my case, generating reports). The other is sending javascript commands to the client without the client first triggering an event (perhaps a chat application). The servlet can use ajax_cmdToClient for this second use.

--John


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to