You can use the target view if your know that NavigationManager already has your target view as next (or previous) component. Most commonly you have multiple views where you can navigate to and thus it is better to instantiate the new view when user actually clicks the navigation button. This also saves some memory on the server side. If you only have one “next view” or users selects one most of the time then you can do it like this:
myView = new ServerList();
navigationManager.setNextView(myView);
navigationButton = new NavigationButton("Server list", myView);
Normally you have click listener that calls navigateTo function with the relevant new view like this:
navButton = new NavigationButton("Server List", new NavigationButtonClickListener() {
public void buttonClick(NavigationButtonClickEvent event) {
getNavigationManager().navigateTo(new ServerList());
}
});
With this approach NavigationManager/View combination is intelligent enough to start view transition immediately when users clicks and the go to server to fetch the new view. This way you will get “native alike” experience even though there happens a server visit.
I wrote code examples right into forum, so they are likely to so issues, but you should get the ice.