Re: [Wicket-user] Receive event when user navigates away from current page

2007-05-21 Thread Martijn Dashorst
body.onunload could be your friend However, don't depend on this behavior to be a failsafe: kill -9 will not trigger the body onunload in the browser, or a power failure on the client side, or a BSOD, or ... Martijn On 5/18/07, Flavius [EMAIL PROTECTED] wrote: I would like to receive an event

Re: [Wicket-user] Receive event when user navigates away from current page

2007-05-21 Thread Flavius
Thanks Martijn. getBodyContainer().getBodyContainer().add(new AjaxEventBehavior(onunload) { protected void onEvent(AjaxRequestTarget target) { //handle cleanup here } }); This works well, except it doesn't fire when the browser is closed. I'm

Re: [Wicket-user] Receive event when user navigates away from current page

2007-05-21 Thread Matej Knopp
Yeah, this will work but only for IE and Firefox. For other browsers (opera, safari) there is no way to get this event i'm affraid. -Matej On 5/21/07, Flavius [EMAIL PROTECTED] wrote: Thanks Martijn. getBodyContainer().getBodyContainer().add(new AjaxEventBehavior(onunload) {

[Wicket-user] Receive event when user navigates away from current page

2007-05-18 Thread Flavius
I would like to receive an event when the user tries to navigate away from the current page. So if the user is on the page and navigates to any other page, closes the window, etc., I'll get an event. I have a page that allows the user to upload files to a record. I store the physical file in a