Jeff,

I agree on creating a share object and storing into HashMap on client
side. But how do I share this HashMap on client side among different
screens such as Header, Navigation etc.  (Other than passing HashMap
to these screens via some setter methods)


Mittal

On Dec 6, 11:23 am, Jeff Schwartz <jefftschwa...@gmail.com> wrote:
> You shouldn't have to query for the information more than once but you do
> need to store it some place and like I said, you have several options. If
> you want to store it on the client and have the information persist even
> after the user closes the browser (across sessions) then you can use
> cookies. But first you need to get the data to the client.
>
> If I were coding this I'd define a serializable class in a shared gwt folder
> that matches the data model for the information that I want to bring down
> and use on the client. I'd then create a remote service (such as a GWT
> RemoteService) that on the server queries for the data and outputs the data
> to the data structure I defined in the shared folder as per the above and
> which then returns an instance of that class to the client. The client, upon
> receiving the result back from the server, would store the result in a
> HashMap for in some other data structure I designed to store data on the
> client or in cookies if I wanted to use the information across sessions.
>
> You have lots of options but they all follow a similar pattern to the above.
>
> Jeff
>
>
>
> On Mon, Dec 6, 2010 at 10:52 AM, Mittal <mitt...@gmail.com> wrote:
> > Yes, its application state for a "User". Why do I need to query server
> > information every time for a user, I think I should able to create
> > client side object such as UserProfile, populate it from server side
> > once user logs in and then pass client side UserProfile object where
> > its required such as Header or Navigation pages.
>
> > - Mittal
>
> > On Dec 6, 9:47 am, Jeff Schwartz <jefftschwa...@gmail.com> wrote:
> > > In your case the state you want to preserve seems to be associated with a
> > > particular user, not the application, so you can use either cookies or
> > > servlet session state to persist the information when the user logs in
> > and
> > > you can then query the information when displaying tabs or reacting to
> > other
> > > user interface events.
>
> > > Jeff
>
> > > On Mon, Dec 6, 2010 at 9:39 AM, Mittal <mitt...@gmail.com> wrote:
> > > > Here's the use case we are dealing with,
>
> > > > SSO token shall be received by GWT application.
> > > > SSO token shall have user profile and role information.
> > > > Once I have read SSO token, I would like to use User Profile
> > > > information to be available in header page and Role information in
> > > > navigation page to control who see's what in terms of functionality
> > > > (tabs).
>
> > > > How do I store or hold token information as an application state ?
>
> > > > - Mittal
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "Google Web Toolkit" group.
> > > > To post to this group, send email to
> > google-web-tool...@googlegroups.com.
> > > > To unsubscribe from this group, send email to
> > > > google-web-toolkit+unsubscr...@googlegroups.com<google-web-toolkit%2bunsubscr...@googlegroups.com>
> > <google-web-toolkit%2bunsubscr...@googlegroups.com<google-web-toolkit%252bunsubscr...@googlegroups.com>
>
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/google-web-toolkit?hl=en.
>
> > > --
> > > *Jeff Schwartz*
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > To post to this group, send email to google-web-tool...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-toolkit+unsubscr...@googlegroups.com<google-web-toolkit%2bunsubscr...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-web-toolkit?hl=en.
>
> --
> *Jeff Schwartz*

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to