Hello everyone,
I have a child presenter (added to the parent in a slot) that fires an event through the eventBus (on a condition) when onBind() is called :
class ChildPresenter extends PresenterWidget<?> {
void onBind() {
instance = initMyInstance();
if (instance == null) {
eventBus.fireEvent(new MyEvent());0
}
}
//...
}
On the parent, i handle the event in the onBind() method like this :
class ParentPresenter {
void onBind() {
eventBus.addHandler(MyEvent.TYPE, new MyEventHandler() {...} );
// I tried also this : addRegisteredHandler(LoggedOutEvent.TYPE, this) and addVisibleHandler(...) too
// Where i implement the MyEventHandler interface in the parent presenter
}
}
The parent does not handle the fired event. Am i doing it wrong? I noticed also when i move the handling process to the onReveal() method of my parent presenter, it worked but twice !!
Any pointers? Thank you.