8 May 2011 1:18 AM #1
Auto Reload Client Page
I am new on gxt and gwt , I have the following:
If a user is currently logged in and the session is still open, when he come to login again from another place I want to make a force logout operation for the previous session and display the login screen again (sure for the old place, to close the web application).
8 May 2011 2:11 AM #2
how can i reload just single node but not whole tree....plz reply...
8 May 2011 4:18 AM #3
I am new :((
in fact I am new with gxt and gwt ... i do not know how to do this, but if I know it I will replay to you, insha'Allah
now who will replay to my post
8 May 2011 5:21 PM #4
One way to do it is like this:
- On the server create a table in your database that will store current sessions (user and session ID)
- When user successfully logs in store session ID and user name in the current sessions table.Then send back session ID to the client application.
- Client application should include user name/session ID with every RPC call to the server.
- Server code should validate user name/session ID against current session table. If session check does not match an exception will be thrown.
When user logs in from another computer check if there is already an active session for this user in the current sessions table. If there is then ask user if he wants to continue with the new session. If user says yes, delete user's existing record from current sessions table and then create a new session record.
When user tries to work on the computer with old session he will get an error on the next call to the server because old session record has been deleted. Your client application can then display the login screen.
This way only one active session for the user can exists.
1 Jun 2011 4:57 AM #5
Have you already found a solution for this?
I also need to have this implemented in my web app.
1 Jun 2011 7:20 PM #6
gaspo100's way would be the cleanest way of handling this issue. If you dont have access to the database to create a table, you could use a singleton instance of a new class as well, holding a hashtable of user to session.
Each time a service is called, it should check the user and the session, and if it doesn't match what's in the hashtable, then you can deal with that how you would like.
2 Jun 2011 5:41 AM #7
I've already implemented mine.
For those who are looking for an alternative:
In my app I don't logout the previous tab but I automatically logged in using the credentials from the most recent session (remember me). I also store the recent session info in my browser's cookies
I pass the user credential info every RPC using a custom RPCRequestBuilder:
Thanks a lot!
23 Sep 2011 12:28 AM #8
By ontangian in forum Ext 2.x: Help & DiscussionReplies: 14Last Post: 19 Apr 2014, 9:22 PM
By raj_plays in forum Ext 3.x: Help & DiscussionReplies: 0Last Post: 28 Apr 2011, 10:32 AM
By richhoude in forum Community DiscussionReplies: 3Last Post: 22 Feb 2010, 7:55 AM
By keztrel in forum Ext 2.x: Help & DiscussionReplies: 0Last Post: 11 Nov 2008, 6:02 AM