Trying to update navigation bar on navigation events and can presenters share the same place?

17 views
Skip to first unread message

Stefan Falk

unread,
Jun 17, 2016, 6:04:22 PM6/17/16
to GWTP
I'm having a typical navigation bar on top of my page which I want to update or change for different places.

For that I created a NestedPresenter.

public class NavBarPresenter extends Presenter<NavBarPresenter.MyView, NavBarPresenter.MyProxy> implements NavBarUiHandlers {
    @Inject
    NavBarPresenter(EventBus eventBus, MyView view, MyProxy proxy) {
   
        super(eventBus, view, proxy, MenuPresenter.SLOT_NavBar);
        this.getView().setUiHandlers(this);
 
        LOGGER.fine("NavBarPresenter constructor() ..");
    }
}

Please note that I set MenuPresenter.SLOT_NavBar for this presenter to be presented in.

However, my problem is first of all that this constructor is actually never called (not seeing the log output).

To start with: What could be the reason? The corresponding module got installed - what more do I have to do?

Further: I am actually not quite sure if I'm doing this right. The use case is simple: update the navigation bar for different places the user is navigating to.

I'd have different options. I could use the event bus and listen to a navigation event e.g. 

I also thought about why not share the same place for different presenters? Is that possible (a good idea)?

Any help on this would be great!

Message has been deleted

Stefan Falk

unread,
Jun 17, 2016, 6:21:34 PM6/17/16
to GWTP
I've just tried to set the same place token for the NavBarPresenter. It's not crashing. So far so good. The constructor is now getting called but for some reason the view is not being drawn in its slot :/
Reply all
Reply to author
Forward
0 new messages