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.

TUTORIALVaadin lets you build secure, UX-first PWAs entirely in Java.
Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Calling javascript synchronously by Enver Haase, 2 weeks ago
Howto close Native Window and refresh Main Window
Hi everybody,
i open in my Application a new native Window. The Native Window have an Closelistener.
Window applicationWindow = new NativeWindow();
applicationWindow.addListener(new Window.CloseListener() {
public void windowClose(CloseEvent e) {
e.getWindow().removeAllComponents();
removeWindow(e.getWindow());
close();
}
});
VaadinWeb vaadinWeb = new VaadinWeb();
applicationWindow.addComponent(vaadinWeb);
WebApplicationContext ctx = (WebApplicationContext) getContext();
int width = ctx.getBrowser().getScreenWidth();
int height = ctx.getBrowser().getScreenHeight();
addWindow(applicationWindow);
getMainWindow().open(
new ExternalResource(applicationWindow.getURL()),
"Application", width, height, Window.BORDER_NONE);
When i close the native Window with "X", the Listener get an event, and close the Native Window.
My Problem is, that the main Window doesn't reload the application.
How can i reload the application? The normal .close() doesn't do it.
Thanks for your help.
Last updated on Apr, 12th 2010
You cannot reply to this thread.