init all Views with Navigator ViewProvider

Hi everybody,

i´m using the ViewProvider class from the Dashboard Demo Application: https://github.com/vaadin/dashboard-demo/blob/master/src/main/java/com/vaadin/demo/dashboard/DashboardNavigator.java

There, a ViewProvider is implemented to create the view at their first call.

is there an easy way to init all views at the beginning of the application?

Sure, just “register” the views using the view instance. No need to specify a ViewProvider manually, it’s added implicitly.

navigator.addView("myview", new MyView());

thank you. sometimes it can be so easy :smiley:
it works perfectly

have a nice weekend