Hi

I've been littering my code with javascript keep-alive calls, to ensures that sessions don't timeout when I'm say writing a blog post, or a user is uploading details in one of my custom forms.

Thinking about the problem, I noticed that I'm normally within an edit when I'm in a form and could fix the problem generically by derving from PRContentsWidget and overriding the #renderContentOn: method as:

renderContentOn: html
super renderContentOn: html.

self context command isView ifFalse: [
html script: (html jQuery ajax
callback: [ "Do nothing" ];
interval: 10 minutes).
"self application cache expiryPolicy configuration at: #cacheTimeout"


The keep alive will then be rendered for all non-view commands. Do others use a similar approach?

Cheers

Nick