Re: How to share data ?

2010-04-18 Thread se
Hi all, Is there any other solution if not using MVP, just a plain project with UiBinder widgets? e.g. main app has user data, determined at runtime; some widgets should be able to read and write to this. I looked at

How to share data ?

2010-04-01 Thread Abdullah Shaikh
Hi All, After the user logins, I get some data from the server and takes him to the home page, and I want to have access to this data over all the pages on which the user navigates, I dont want to pass this data throughout all the pages, is there any to way to share this data, I thought of using

Re: How to share data ?

2010-04-01 Thread Subhrajyoti Moitra
Hello, if u are using MVP pattern u must be having a AppController class to control the application flow and listen to history events (if required). The shared data can be stored as static objects on the AppController. On successful login you can set this static field. From any other view u can

Re: How to share data ?

2010-04-01 Thread Abdullah Shaikh
Hi Subhro, Yes I am using MVP pattern, and as I have a EventBus in my AppPresenter, which handles the LoginEvent, I can store the data in my controller, but how do I access them in my other view/presenter, one way I can see is can I can pass the data to the presenter while I am creating them in

Re: How to share data ?

2010-04-01 Thread Subhrajyoti Moitra
In my AppController i have this in bind(). this.eventBus.addHandler(LoginEvent.TYPE,new LoginEventHandler() { public void onLoginEvent(LoginEvent event) { final String token=History.getToken(); authService.login(event.getUsername(),

Re: How to share data ?

2010-04-01 Thread Abdullah Shaikh
Cool .. I will try this out ... thanks - Abdullah On Thu, Apr 1, 2010 at 12:58 PM, Subhrajyoti Moitra subhrajyo...@gmail.comwrote: In my AppController i have this in bind(). this.eventBus.addHandler(LoginEvent.TYPE,new LoginEventHandler() { public void onLoginEvent(LoginEvent