Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Session variables ?

    Hi everybody,

    I have a question with SmartGWT , how can i store session variables, like username, role and relevant data to use in the application flow.

    I had thought to use a client class with a static HashMap with key and value, for example:

    private static HashMap<String, Object> sessiondata = new HashMap<String, Object>();

    In the login window put:
    sessiondata .put("username","example");

    And in another part of the application flow, retrieve the value like this...
    sessiondata .get("username");


    But, it has a problem because, if there are 2 concurrent users or more, this value will be overwritten because the map is static. any idea ?

    Thanks for your help ...
    Last edited by escomvicto; 13 Oct 2010, 10:26. Reason: suscribe

    #2
    Any idea ? how are you manage this values ??

    Comment

    Working...
    X