Regarding the MODEL, you should not have static variables, Instead you should have a singleton Service in the client side. Create UserService Interface with one method getLoggedInUserInfo(AsyncCallBack<UserInfo>). Whenever you need it call this interface. In the implementation you should have cache so only the first time will ask data from the server. This way you will avoid initialization sequences of static models in the client and only once the data is required it will be fetched. Sharing of data is threw the bus. You should have your display expose mouseClickedEvent. The presenter should capture it and fire it to the bus. The secondPresenter should get the event and notify the second display on whatever required.
Hope it helps Nir -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Stefan Bachert Sent: Thursday, July 15, 2010 6:02 PM To: Google Web Toolkit Subject: Re: Client session Hi, I am not sure what you mean with client side sessions? Do you mean to pass the HttpSession (maybe just the id) to the client side? But for what reason? It is already there. Either due to url-rewriting or by cookie. Stefan Bachert http://gwtworld.de On 9 Jul., 19:48, mk <[email protected]> wrote: > How to implement a client side session ( and any best practices to > implement them). > Is it to just create a static variable ? > > How do two different MVP widgets share MODEL data (i.e. user input > data). > > How do two different MVP widgets share VIEW data ( for example if > display of one widget is dependent on mouse click location of second > widget, than how do two widgets share view information i.e. mouse > click location). > > Again, all widgets are designed using MVP and send events using > EventBus. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
