Open Window in New Tab - Vaadin 7.2.0

Hello all,

I’m trying to open a com.vaadin.ui.Window in a new tab. I can get add it to the main window with no issues, but I would like to open it as a new tab.

Working code:

Window sw = new Window("Receipt"); sw.setContent(new PrintWindow(url));; myUi.addWindow(sw); Where PrintWindow extends VerticalLayout and has some other components in it.

What I would like to do is this (code from Vaadin 6) :

getApplication().getMainWindow().open(new ExternalResource(sw.getURL()), "_blank"); But the getURL() method no longer exists in Vaadin 7.

Any ideas?

You should use BrowserWindowOpener extension. Check it out from
Book of Vaadin

Works fine as a standalone, but I’m using a Vaadin portlet in a Liferay Server and the window does not appear.

That makes it harder. Anyway, there is already discussion about BrowserWindowOpener on portlet environment here:!/thread/7557109

I think you can find that useful.