'Vaadin LayoutApp not showing component

I created a view in class Teste extending AppLayout And in addition I created MainAction that contain Teste as layout When a run principal/tarefas route it render only a navbar. how do i render both components

Code wrote in vaadin

Result of Test class

Result of Main class having a parent Test class



Solution 1:[1]

Please replace the image links with the actual code. So that we can reference it in our answers and so that others can see the code.

With that said - I think the issue is that you are calling AppLayout.setContent(...) to add your menu. I believe the method you are looking for is AppLayout.addToDrawer(...) which will add your menu to the "drawer", which slides in from the left when you click the hamburger/menu icon. Adding it to the drawer means that it will remain on the layout when the "content" changes, which is what happens when you open a new route.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 The Shoe Shiner