That sounds like a good strategy, but keep in mind that not everybody
wants to include the jQuery libraries in their site.
Lukas
On 7 January 2011 19:52, Nick Ager <nick.ager(a)gmail.com> wrote:
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
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
--
Lukas Renggli
www.lukas-renggli.ch