Forgot to mention that I think that the chat system should be a service or
series of services that probably keep the state of the chat room via db back
end (using suitable amount of on memory cache). Then there would be the
still alive poll page that would only signal the service that user is still
there, then a page where the actual chat would be. The chat page could be
also broken to smaller chunks to improve performance. (One page could supply
the contents of currently active chat members etc, and the other could
supply the incoming / outgoing messages.)

Haven't done anything like that, but that would be the path that I would
take. No guarantees though :D

 - Ville


BarryDev wrote:
> 
> 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-tp20093965p20104801.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