@Override
 public void onNavigationEvent(@Observes NavigationEvent event) {
   try {
     ui.getNavigator().navigateTo(event.getNavigateTo());
   } catch (Exception e) {
     throw new RuntimeException(e);
   }
 }
 @PostConstruct
 public void initialize() {
   if (ui.getNavigator() == null) {
     Navigator navigator = new Navigator(ui, ui);
     navigator.addProvider(viewProvider);
     navigator.setErrorView(errorView);
   }
 }