Dynamic Changes to Main Layout

Hi,

A question inspired by a new business funny requirement…

Let’s say we have a main layout, with a menu on the left (as a Vaadin Tabs). The menu has couple of items. The layout is used by multiple view, via @Route annotation.

What if, the user want to be able to add/remove items from the menu?

Basically, they’d want to have a menu they can manually customize, by only showing their favorite items.

Honestly… I have no idea where to start with this :smiley: Any idea?

No one ? :frowning:

Did you have any luck finding a solution? I need to do something similar, where the tabs on the app layout are adjusted depending on the current view. So, if the user is on the home page, lets say the tabs are [tab 1, tab 2, tab 3]
; but after navigating to tab 1’s view, the tabs are adjusted to [tab 1, tab 4, tab 5]
.

I think it should be possible to try to pass these as url parameters and have a before enter event affect the tabs, although how that is handled for the mainView.class thata actually constructs the app layout isnt clear.

Rather than via @Route annotation, you can programmatically invoke the view corresponding to the dynamically added menu items.