Al Maw wrote:
>
> Eelco Hillenius wrote:
>>> well, I have a project where the requirement is to do some things when
>>> user
>>> logs out, otherwise the same user can't use the application for the next
>>> 30
>>> minutes. It works fine when user uses the logout link, but I want the
>>> same
>>> behavior when the user closes the window. Any hints how to do this?
>>
>> That's just not possible to my best knowledge. It has nothing to do
>> with Wicket, but just with the fact that such an event (closing a
>> browser window using the functionality the OS provides for that) can't
>> be trapped.
>
> Hmmm. You might be able to mess with the onbeforeunload event on <body>.
>
> Regards,
>
> Al
> --
>
> I tried something like this with no success.
>
> I used
> getBodyContainer().getBodyContainer().add(new
> AjaxEventBehavior("onunload"){
> protected void onEvent(AjaxRequestTarget target){
> System.out.println("here");
> }
> });
>
> but it never gets in there. I put it in the constructor of a subclass of
> WebPage that I use as a base page for the project. Should the call to
> getBodyContainer() be the first thing to do inside the constructor of the
> page?
>
> Just before this I output some javascript using a label that goes between
> the the head and the body of the html. Could this mess things up?
>
> I tried placing a simple onunload="alert('this is from the body tag')" at
> the body tag of the page's html, but this did not succed as well...
>
>
> Konstantinos
>
>
> Alastair Maw
> Wicket-biased blog at http://herebebeasties.com
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
--
View this message in context:
http://www.nabble.com/how-to-detect-http-session-expiry---timeout-due-to-no-user-activity-tf3930442.html#a11171055
Sent from the Wicket - User mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user