LoginForm inside a sub window

Hi,

I need to create a child window inside the main window and put a LoginForm inside that child window. I’m creating a Panel which contains the LoginForm like this:


this.loginPanel = new Panel("Login");
this.loginPanel.setWidth("250px");
this.loginForm = new LoginForm();
this.loginForm.addListener(this);
this.loginPanel.addComponent(this.loginForm);

And after that, I’m creating the sub window that contains the login panel.

this.subWindow = new Window("Log in!");
this.subWindow.setWidth("300px");
this.subWindow.setHeight("75%");
this.subWindow.center();
this.subWindow.setModal(false);
this.subWindow.addComponent(this.loginPanel);
this.windowToEdit.addWindow(this.subWindow);

The sub window is created and displayed as it should, but the panel that should contain the LoginForm is empty. Adding for example a Button inside the Panel works. And if I don’t use a sub window at all, everything works correctly. What I’m doing wrong when I’m trying to use a sub window?

Regards,
Aki

Peculiar indeed…

Try setting the LoginForm’s height and width explicitly, see if you can get to show up that way. Or, you could try and find any layout bugs using the debug-window (add ?debug parameter to your app url and click “Analyze layouts”).

Ok, thanks! I’ve been busy with other projects, but I’ll try your tips and report if they helped.