You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by fachhoch <fa...@gmail.com> on 2010/09/01 16:21:02 UTC

session timeout notification using cometd

I want to notify clients about their session timeout.If the user is idle and
his session is about to expire I want to   warn users about this , can I do
this with wicket-cometd ?  
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/session-timeout-notification-using-cometd-tp2403249p2403249.html
Sent from the Wicket - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: session timeout notification using cometd

Posted by jcgarciam <jc...@gmail.com>.
Here is a very rough example,  keep in mind there a several  factors that
can reset the timeout to happen in the server and then you need to reset
your timer in the client,  the most troublesome to handle are ajax
interaction and iframe.

So assuming you don't have any ajax component or iframe on the page that can
actually trigger any server interaction and the user just sit in the page
and wait, something like this is the easiest way:

setTimeout("showAboutToTimeout()", (1000 * (60 * 28) );  //28min

function showAboutToTimeout(){
  // Here you can build you message or show floating div, what ever you like
  alert("Your session may timeout in 2 minutes unless you interact with the
page :) ");
}

On Wed, Sep 1, 2010 at 11:52 AM, fachhoch [via Apache Wicket] <
ml-node+2403332-1651621642-65838@n4.nabble.com<ml...@n4.nabble.com>
> wrote:

> I can do that, do you have any examples for java script notification when
> session is about to timeoout ?
>
> ------------------------------
>  View message @
> http://apache-wicket.1842946.n4.nabble.com/session-timeout-notification-using-cometd-tp2403249p2403332.html
> To unsubscribe from Apache Wicket, click here<http://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_code&node=1842946&code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=>.
>
>
>


-- 
Sincerely,
JC (http://www.linkedin.com/in/jcgarciam)
Work smarter, not harder!.

-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/session-timeout-notification-using-cometd-tp2403249p2403388.html
Sent from the Wicket - User mailing list archive at Nabble.com.

Re: session timeout notification using cometd

Posted by fachhoch <fa...@gmail.com>.
I can do that, do you have any examples for java script notification when
session is about to timeoout ?
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/session-timeout-notification-using-cometd-tp2403249p2403332.html
Sent from the Wicket - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: session timeout notification using cometd

Posted by jcgarciam <jc...@gmail.com>.
You indeed can use wicket-cometd on that, but why not setting a simple
Javascript timer on the page (set to your server-timeout configuratin) which
get reset on user interaction.


On Wed, Sep 1, 2010 at 11:21 AM, fachhoch [via Apache Wicket] <
ml-node+2403249-1689023062-65838@n4.nabble.com<ml...@n4.nabble.com>
> wrote:

> I want to notify clients about their session timeout.If the user is idle
> and his session is about to expire I want to   warn users about this , can I
> do this with wicket-cometd ?
>
> ------------------------------
>  View message @
> http://apache-wicket.1842946.n4.nabble.com/session-timeout-notification-using-cometd-tp2403249p2403249.html
> To unsubscribe from Apache Wicket, click here<http://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_code&node=1842946&code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=>.
>
>
>


-- 
Sincerely,
JC (http://www.linkedin.com/in/jcgarciam)
Work smarter, not harder!.

-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/session-timeout-notification-using-cometd-tp2403249p2403283.html
Sent from the Wicket - User mailing list archive at Nabble.com.