LoginForm iframe problem

hi,

i am using a modified Loginform, nothing special and it works, see here:
VaadinTest

I am able to login and logout BUT if i am using the app embedded inside of an iframe, i need to refresh it (F5) after login

check it there:
Link

Code of init method:

	final Window mainWindow = new Window("Test");
		setMainWindow(mainWindow);
		
		final Window loginSubWindow = new Window("Login");
	    getMainWindow().addWindow(loginSubWindow);

	    CustomerLoginForm loginForm = new CustomerLoginForm("User.:","Password:", "Login");
	    loginForm.addListener(new LoginForm.LoginListener() {
			private static final long serialVersionUID = -8914509608772997535L;

			public void onLogin(LoginEvent event) {
				String user = event.getLoginParameter("username");
				String psw = event.getLoginParameter("password");
				
				getMainWindow().showNotification(
	                        "New Login",
	                        "Username: " + event.getLoginParameter("username")
	                                + ", password: "
	                                + event.getLoginParameter("password"));
				
				setUser(event.getLoginParameter("username"));
				getMainWindow().removeWindow(loginSubWindow);
				
				Label test = new Label("Logged in as " + getUser());
				Button closeButton = new Button("Logout");
				closeButton.addListener(new Button.ClickListener() {
					public void buttonClick(ClickEvent event) {
						mainWindow.getApplication().close();
					}
				});
				getMainWindow().addComponent(test);
				getMainWindow().addComponent(closeButton);
			}
	    });
	    
	    loginSubWindow.setWidth(300, Sizeable.UNITS_PIXELS);
	    loginSubWindow.setHeight(250, Sizeable.UNITS_PIXELS);
	    loginSubWindow.addComponent(loginForm);

After 2hours of investigation i gave up, maybe u can give me an idea how to solve this!
And i need the iframe implementation …

thx, best regards Chris

Hi,

I have filed a bug for this:
http://dev.vaadin.com/ticket/8144

As a workaround until a proper fix has been released, you can make your own copy of com.vaadin.ui.LoginForm and change top.vaadin.forceSync() to parent.parent.vaadin.forceSync()

that works … thx u very much!!!

best regards


http://dev.vaadin.com/ticket/8144
has now been fixed and the fix will be included in Vaadin 6.8.2 and newer.