[Seaside] Keep-alive timer for Seaside app

Johan Brichau johan at inceptive.be
Thu Jan 6 18:36:56 UTC 2011


On 06 Jan 2011, at 17:53, Tony Fleig wrote:

> | script cacheTimeout |	
> 	cacheTimeout := self session application cache expiryPolicy
> configuration at: #cacheTimeout.
> 	html document addLoadScript: (
> 		html script: (
> 			html jQuery ajax
> 				callback: [];
> 				interval: (cacheTimeout - 60) seconds))
> 
> The checkbox onChange script and callback never happen.
> 
> I don't understand what is going on here. Somehow the load script is
> interfering with ajax execution elsewhere on the page. Inspection of
> the source code has revealed nothing obvious to me.

The argument of addLoadScript should be a String or a JSScript.
In the code above, it's the return value of the statement "html script: ... ", which is the WACanvas instance (in the html variable) itself.

Inspection of the source code should have revealed that. Are you not using something like Firebug (or any other development tools in Chrome or Safari) at the client side?

A crash of javascript on your page will prevent it from executing the other javascripts (onChange handlers) on your page.

Try the following:

| script cacheTimeout |	
	cacheTimeout := self session application cache expiryPolicy
configuration at: #cacheTimeout.
	html document addLoadScript: (
			html jQuery ajax
				callback: [];
				interval: (cacheTimeout - 60) seconds)


More information about the seaside mailing list