Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

LoginForm does not work

Thomas Mauch
1 decade ago Mar 26, 2010 10:18pm
Joonas Lehtinen
1 decade ago Mar 27, 2010 10:36pm
Joonas Lehtinen
1 decade ago Mar 27, 2010 10:43pm

While the bug is being fixed, you can easily go around it by switching layouts instead of windows. Something like this works fine:

package com.example.logintest;

import com.vaadin.Application;
import com.vaadin.ui.Button;
import com.vaadin.ui.Label;
import com.vaadin.ui.LoginForm;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Window;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.LoginForm.LoginEvent;
import com.vaadin.ui.LoginForm.LoginListener;

public class LogintestApplication extends Application {

    LoginForm lf = new LoginForm();

    public void init() {
        Window main = new Window("My App");
        lf.addListener(new LoginListener() {
            public void onLogin(LoginEvent event) {

    private void loggedIn() {
        VerticalLayout appLayout = new VerticalLayout();
        appLayout.addComponent(new Label("My app goes here"));
        appLayout.addComponent(new Button("Logout", new Button.ClickListener() {
            public void buttonClick(ClickEvent event) {
Thomas Mauch
1 decade ago Mar 30, 2010 11:09pm