Re: GWT Activities, Places with Event Bus ??????

2011-02-28 Thread Jian Liu
SergeZ, I totally understand what you want - you want the Activity/Place to handle the History Management, and mean time you don't want to loss the power of EventBus so you can have Event Listeners on different Presenter (and they could be on the same screen) to listen Events. What you can is

Re: GWT Activities, Places with Event Bus ??????

2011-01-21 Thread Thomas Broyer
On Thursday, January 20, 2011 10:47:17 PM UTC+1, Bálint Kriván wrote: That's not quite right. You can have more Places, mapping them with different ActivityMappers. You'll of course have multiple places in an app, but as ailinykh said you'll only be at one place at a time (each place will

Re: GWT Activities, Places with Event Bus ??????

2011-01-20 Thread ailinykh
Why do you need events? Each Activity is notified when it becomes active ( method start() is called). Just check the application state at this moment. If you want to share some data between several activities make this data singleton. Thank you, Andrey On Jan 19, 7:59 am, SergeZ

Re: GWT Activities, Places with Event Bus ??????

2011-01-20 Thread Ben Imp
Events allow you to synchronize two concurrently active presenters. If you never have more than one presenter active in your application at a given time, then this becomes less of an issue. -Ben On Jan 20, 8:01 am, ailinykh ailin...@gmail.com wrote: Why do you need events? Each Activity is

Re: GWT Activities, Places with Event Bus ??????

2011-01-20 Thread ailinykh
That's right. But he is talking about synchronization between places (pages) . You have only one at the time. Andrey On Jan 20, 8:17 am, Ben Imp benlee...@gmail.com wrote: Events allow you to synchronize two concurrently active presenters. If you never have more than one presenter active in

Re: GWT Activities, Places with Event Bus ??????

2011-01-20 Thread Bálint Kriván
That's not quite right. You can have more Places, mapping them with different ActivityMappers. On Thu, Jan 20, 2011 at 10:36 PM, ailinykh ailin...@gmail.com wrote: That's right. But he is talking about synchronization between places (pages) . You have only one at the time. Andrey On Jan

GWT Activities, Places with Event Bus ??????

2011-01-19 Thread SergeZ
Hello everybody! Can someone help me to sort things out ? The question is: is it possible to use EventBus (or just HandlerManager ) with Activities and Places ? How can I notify a set of my places ( for example, 5 widgets ) about an event which happened in a particular place (a widget, not

Re: GWT Activities, Places with Event Bus ??????

2011-01-19 Thread Ben Imp
I solve this issue by having a single application wide event bus that is passed to all of the presenters in my application. I bundle it up with other application resources, such as a navigation control and an application wide model, and simply hand it to them in the constructor. So, if I wanted

Re: GWT Activities, Places with Event Bus ??????

2011-01-19 Thread Thomas Broyer
You have en EventBus passed to your Activities' start(), so just use that (eventBus.fireEvent or fireEventWithSource on one side, and eventBus.addHandler or addHandlerWithSource on the other side). For this to work, you of course have to use the same EventBus with all your ActivityManagers, but

Re: GWT Activities, Places with Event Bus ??????

2011-01-19 Thread SergeZ
I really appreciate your answers, thanks a lot ! If i got you right, the approach of using the same eventBus instance for whole the app declines the idea of Places/Activities, isn't it ? If so, than how can I keep those ( Places/Activities ) functionality and making multiple notification at the