(Navigator) navigation between sub views in a main view

Hey guy,

I stuck a bit with the Navigator. Currently i moved from a LoginView to my MainView. My MainView has a header, a footer, between them a content area. In the header are buttons to switch between the different content.
Now it’s would be nice if I can use the Navigator to switch between the views in the content area but the MainView with it’s header and footer should be always there. Is something like that possible? If yes, how I can implement it?

Thanks for you answers :slight_smile:

The easiest way is probably to write a custom ViewDisplay that knows based on the view whether to display it “fullscreen” or inside the content area. Another approach would be to have non-Component Views that share a reference to the main layout, and inside their enter() method first attach the layout if it wasn’t already, and then set the content area contents.

Ticket #9800
is about implementing support for such hierarchical views in general.

any examples to these solutions on the web that you can point to?

Your use case sounds just like in the
navigation section in the Book
, or did I miss something?. The example is
online here

Yes, this online demo helped me a lot too.
My basic navigator concept is that your main view/frame implements View und delegates to underlying components when the implement View too. So every child can do what it want.