I have created a simple browser application with only one push page and two tables in it.

I have solved most of the communication problems between the browser and the LS Adapters.

I have only one major problem:

I create the push page while logging in and I am setting the username and password in the same page. On the server side when the nofifyUser method gets called in the MetaDataAdapter, I am logging into my server application. The problem is when the client gets disconnected, I need to intimate my server application that the client has got disconnected. Currently I am not able to do it. But, If the client clicks on the logout button provided by me in the browser, I am able to capture this and send it to the LS using SendMessage from the client side and I am able to handle the same using notifyUserMessage in MetaDataAdapter and inturn send it to my server application. But if the users closes the browser window I am not sure in which event I should capture this event and send the logout message to my server application.

I initially thought of using the notifySessionClose event. But this event gets fired in many scenarios. I also tried writing under notifyTablesClose event. This has the same problem as of notifySessionClose.

Note: I have written a logic in the DataAdapter that if the user is already logged in, we will not allow the same user to login again. So while the browser is closed and opened again, I need to allow the user to login again. But currently since I am not able to trap it and I am send a message like, "User already logged in". I need to trap this browser close, remove the entry in the hashmap table present in the data adapeter, so that next time the user logs in I will allow him to log in.

I hope I have given you a good brief on the problem. Please let me know the solution for the same.

If you require any more information or clarification from me, please get back.