Showing LoginForm inside an AppLayout


How to show LoginForm inside AppLayout? I tried to add in a View let say VerticalView and add this View into navBar.

What happens is LoginForm is showed before AppLayout displayed.

I expect that LoginForm is displayed inside AppLayout under the navbar.

I try LoginOverlay but it has the same behaviour. After pressing a button, A loginform is showed blocking (or covering) main layout.

If i want to integrate login form in my layout, should i create my own LoginForm? or it is something that not recommended and better to have blocking login form?

thank you in advance.


Sounds like your Route annotation is missing the layout parameter.

Hi @knoobie, you make my day man:)

@Route(value = "login", layout = MainLayout.class)
@PageTitle("Login | Vaadin CRM")
public class LoginView extends VerticalLayout implements BeforeEnterObserver {

I forgot to add layout = MainLayout.class . I add it and now the login page is inside AppLayout.

Thank for poiting out my mistakes.