I'm implementing MVP (Activities and Places) with Errai-ui. And I have two regions
Center and Popup.
Are created as follows:
@Produces
@Singleton
@Named("center")
public ActivityManager getCenterActivityManager() {
GWT.log("getCenterActivityManager()");
return new ActivityManager(centerMapper, bus);
}
@Produces
@Singleton
@Named("popup")
public ActivityManager getPopupActivityManager() {
GWT.log("getPopupActivityManager()");
return new ActivityManager(popupMapper, bus);
}
And injected as follows:
@Inject
@Named("center")
private ActivityManager centerActivityManager;
@Inject
@Named("popup")
private ActivityManager popupActivityManager;
And then setting display for each of the Managers:
centerActivityManager.setDisplay(layout.getCenterReqion());
popupActivityManager.setDisplay(layout.getPopupRegion());
But only one is injected, in this case: CenterActivityManager, the first in the orden of injection. I also tested with Binding Annotations instead of @Named, but the result is the same.
I think it calls the same produces...
Thanks
This has been found and fixed: https://issues.jboss.org/browse/ERRAI-528