Welcome page

18 views
Skip to first unread message

newbie

unread,
Oct 14, 2015, 6:18:35 AM10/14/15
to Mvp4g
Hi !

I have in my project a RootView and a HomeView, this latter will be displayed inside the main Container of the RootView but only with clicking on the HomeButton.
Now I want to get the HomeView displayed inside the RootView at the first browser loading.

I tried to add in my MainEventBus interface to make:

@Events(startPresenter=RootPresenter.class)
public interface MainEventBus extends EventBus{
@Start
@Event(handlers = { RootPresenter.class })
public void start(); 
@Event(handlers = {HomePresenter.class, RootPresenter.class})
public void goToHome();
@Event(handlers = {RootPresenter.class})
public void changeRootBody(Widget w);
@Event(handlers={RootPresenter.class})
public void goToRoot();
}


and in my RootPresenter:

public void onStart(){
onGoToRoot();
onGoToMosaique();
}

but without success, any idea will be appreciated

Frank Hossfeld

unread,
Oct 14, 2015, 3:30:35 PM10/14/15
to Mvp4g
Hi,

depending on your information, it is hard to say, what will be the best solution for your problem.  

Let's say your RootView is a DockLayoutPanel and the wet area is reserved for the navigation. In this case you can create a NavigationView and NavigationPresenter and add the navigation to the RootView. This can be done using the 'bind'-attribute of the event annotation (take a look here),

Also, you can look at the mvp4g-examples. The EmployeeAdmin example shows, ho you can divide your RootView in areas and set widgets.

Maybe you can post some more informations, so it might be easier to help you.
Reply all
Reply to author
Forward
0 new messages