With the Mvp4g architecture, (Only)one instance of the view (injected using @Presenter annotation)is associated with its presenter. In my case, I have a EntityView with its Presenter EntityPresenter. whenever user clicks on an Leaf node of a Navigator tree, I add a new Tab into TabSet. And this new Tab will contain an EntityView. So, I will have as many EntityView as many Tab in the TabSeT.
I have set multiple=true
for EntityPresenter.
EntityView's constructor accepts one argument.
@Inject
public EntityView(final Record view) {
//some initialization
}
Question is, where I do (from another presenter):
EntityPresenter presenter = eventBus.addHandler(EntityPresenter.class);
I have one argument Record params
which I want to pass to EntityView's constructor, how to do that?
and annotating constructor(accepting argument) with @Inject will inject EntityView to EntityPresenter ?