Is there a way to change the ComponentContainer of Navigator object ?

Hi,
I am currently developing an application and making use of a Navigator. There is a sidebar with a list of buttons. On the other side there is a Component container(a vertical layout). When I click on each button it navigates to different tab sheets. Inside each tab, again there are certain buttons which should navigate to different layouts( or pages,panels,windows as we can visualise) when they are clicked.
So the problem is, I dont know how to achieve this task.

Case 1 : I tried to create 2 different Navigators, but when I click on back button, it gives me exceptions at the point where the sub navigation began.
Case 2 : I tried using a single Navigator by writing everything in it, but at the point where the sub navigation should begin the entire tab sheet gets navigated. That’s because the tabsheet is residing inside the Component Container. I tried to change the Component Container at this point. But I couldnt find any method in Vaadin to change the Component Container of the navigator instance.

Please give me a solution.

Thanks,
Nanda Kishor .M

This should be doable with either approach.

To resolve the issue of changing the component container for the inner navigator, you can use a custom ViewDisplay implementation instead of giving the ComponentContainer to the constructor of Navigator. Just copy the relevant bits from Navigator.SingleComponentContainerViewDisplay or Navigator.ComponentContainerViewDisplay - about 20-30 lines of code.

In the case of two Navigators, the inner one should perhaps have a custom ViewProvider that ignores the parts of the path that are not relevant for that level (use a subclass of an existing ViewProvider that just strips away the first part(s) of the path before calling the superclass). Keep in mind that all Navigators share the same URI fragment and should only look at the part that is of interest to them.

The last navigator that was created is used by the UI class to navigate to the initial page.