Hi, 

Maybe T5 would not have any solution for such case, I think this is a client 
browser issue, for server doesn't know user has changed url(SessionListener may 
know closing browser).

Maybe you can handle window event 'window.onbeforeunload'(it will be fired if 
closing browser, changing url, click lick and so on happen -- leaving current 
page), in IE it works, but I am not sure about others.

Thanks!

DH


----- Original Message ----- 
From: "BarryDev" <[EMAIL PROTECTED]>
To: <users@tapestry.apache.org>
Sent: Wednesday, October 22, 2008 12:16 AM
Subject: T5 - Catching user leaving a page


> 
> Hi all,
> 
> I've completed the hi/lo and address tutorial and I'm not trying to write a
> simple chatroom to learn some more about tapestry. 
> 
> My basic chatroom currently has a login page which forwards to a chatroom
> which lists the usernames of all logged in users.  I'm currently using a
> singleton to store all the users who are logged in and fetch them when
> rendering the chatroom.
> 
> What I would like to do next is catch a user leaving the chatroom no matter
> what they're do (closing broswer, typing in new url, clicking a link in the
> app, hitting back button in browser) so I can remove them from the list of
> logged in users.
> 
> What's the best mechanism to do this with Tap5, is there a page detached
> event I can register to that will get thrown in all cases?  Is it better to
> have a bit of javascript on the page which polls another page doing an async
> I'm still alive? (I'll probably need to do something like this for polling
> for new messages from other users)
> 
> Or is there a more elegant solution hidden within T5?  I've searched here
> and the docs but haven't been able to find anything.
> 
> Regards
> Barry
> -- 
> View this message in context: 
> http://www.nabble.com/T5---Catching-user-leaving-a-page-tp20093965p20093965.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

Reply via email to