I uss vaadin 8 with navigator
I create a navigator with:
Csslayout firstContainer = new CssLayout();
Navigator navigator = new Navigator(this, firstContainer);
navigator.addView(MAINVIEW, new FirstView());
MainView is shown in container.
Later in the same progam i want to change container to newContainer like:
CssLayout secondContainer = new CssLayout();
navigator.setComponentContainer(secondContainer);
navigator.addView(SECONDVIEW, new SecondView())
=> or something like _this.
I want that SecondView is shown in newContainer.
How can i change it?
I would recommend you to use the ViewDisplay interface instead. It gives you a solid control of how the views are displayed as they are shown. Just implement the method showView(View) where you can add the view into your matching css layout