-
1. Re: a4j:poll as client side timer
blabno Dec 9, 2010 12:38 PM (in response to jabailo)a4j:poll is not for such purpose. It will be easier if you write your own JavaScript function and put it into setTimeout() or setInterval(). The I suggest binding two events "keydown" and "click" on document. That should trigger function that would reset the timeout or interval.
Personally I think it is better not to notify user about session expiration comming soon. I assume that if user has open window then his session should be extended. To do that i have a4j:poll with interval shorter by one minute from session timeout.
-
2. Re: a4j:poll as client side timer
jabailo Dec 9, 2010 2:49 PM (in response to blabno)If the user has an open window and leaves his desk, you would not want to extend the timeout because that would create a security problem.
The point of the notification is that if he is sitting at his desk and he does something else (talks on phone) for longer than the JBoss timeout, he should be notified in case he wants to keep working on his application later.
I found a client side plugin to do this writen for JQuery and you are helping me in another thread (Thanks!)