I’m definitely new in Vaadin, that’s why I’ve decided to write something here.
I want to create a side menu/Index wich is fixed and cannot be hidden.
Basically, if the sideBar that is shown is the sideBar.png can be replaced into a thing looking like the sideMenu.png, it would be great…
But after hours searching how to change the menu that is created in the “getting started” project of Vaadin, I couldn’t find anything…
If you want more precisions I can try to explain it better.
I hope you can help me.
If you want a fixed side bar like that, you can replace the AppLayout with a simpler HorizontalLayout component. Within the HL, add a side bar component with a fixed width (a VerticalLayout would work well for what you had in the screen shot).
Okay, I’ve succeeded in doing that “fixed” menu, but I have another problem linked with it.
I want to get the layout displayed by another View, and put it in a specific layout in the MainView, so that it’s not placed below the side menu.
The image shows what I’m trying to accomplish. I could have done another ticket since it’s different but I thought that since it’s linked with the side Menu part, I could ask again here.
I’ve searched on the forum and people are talking about EventBus but I really don’t get it and I’m not sure it’s what I need.
Marcus Hellberg:
You should be able to use the showRouterLayoutContent() method to configure where the content is shown.
I definitely don’t get what this function does. Plus, when I try to copy/past it, I have two errors related to add() and remove() functions, since they require a component and currentView is a HasComponents (since HasElements is implemented in it).