@@ -0,0 +1,1525 @@
+package com.vaadin.tests.components.loginform;%0A%0Aimport com.vaadin.Application;%0Aimport com.vaadin.ui.LoginForm;%0Aimport com.vaadin.ui.Window;%0Aimport com.vaadin.ui.LoginForm.LoginEvent;%0Aimport com.vaadin.ui.LoginForm.LoginListener;%0A%0A@SuppressWarnings(%22serial%22)%0Apublic class LoginFormWithMultipleWindows extends Application %7B%0A%0A    /**%0A     * =======================================================================%0A     * Comment out this to make the LoginForm work as expected%0A     * =======================================================================%0A     */%0A    @Override%0A    public Window getWindow(String name) %7B%0A        Window w = super.getWindow(name);%0A        if (w == null) %7B%0A            w = new LoginFormWindow();%0A            w.setName(name);%0A            addWindow(w);%0A        %7D%0A        return w;%0A%0A    %7D%0A%0A    @Override%0A    public void init() %7B%0A        setMainWindow(new LoginFormWindow());%0A    %7D%0A%0A    public class LoginFormWindow extends Window %7B%0A        public LoginFormWindow() %7B%0A            super();%0A%0A            LoginForm loginForm = new LoginForm();%0A            loginForm.setSizeUndefined();%0A%0A            loginForm.addListener(new LoginListener() %7B%0A%0A                private static final long serialVersionUID = 1L;%0A%0A                public void onLogin(LoginEvent event) %7B%0A                    showNotification(event.getLoginParameter(%22username%22) + %22:%22%0A                            + event.getLoginParameter(%22password%22));%0A%0A                %7D%0A            %7D);%0A%0A            addComponent(loginForm);%0A        %7D%0A    %7D%0A%0A%7D%0A

Test case for #3807 (LoginFormWithMultipleWindows)