Managing multiple navigator in Vaadin 8

Currently I have 2 navigators in my project. First navigator’s ViewDisplay is UI and second navigators ViewDisplay is part of UI. I have created the second navigator for navigating through my side menu. As I want to change only the contents of selected menu items.

But the problem is I didn’t find any way to tell vaadin when to use which navigator. Plus how vaadin manages multiple navigator? What is the lifecycle of navigators?

Any help will be appreciated. Thanks in advance.

Navigator is tied to UI and it is one to one relationship in Vaadin 7 and 8. So it is not possible to have multiple Navigators within one UI. This limitation can be hacked of course by using multiple UI’s. So you need to implement the subview as its own UI and embbed that to master UI.

The best way to embbed the sub UI is to use BrowserFrame component or [Embedded UI add-on]
(https://vaadin.com/directory/component/embedded-ui) which reduces need for boiler plate code. You can find more info from blog post [Microservices and Vaadin UIs]
(https://vaadin.com/blog/microservices-and-vaadin-uis).

We were aware of this limitation, and in the new Vaadin 10+ platform series Navigator has been replaced with Router concept, that supports subnavigation.

See also: https://stackoverflow.com/questions/52604274/managing-multiple-navigator-in-vaadin-8/52604948#52604948

Has been also asked before: https://vaadin.com/forum/thread/10072256/navigators-can-i-do-it

is there another way to use 2 navigator?

my problem is:

I have a navigator for:

UI

  • LoginView
  • PasswordResetView

and if the user hav authorized

UI

  • DashBoardView
  • GridView
  • Profi

somebody have another idea to implements?