Loading...
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.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Popup window in a buttonclick Event.

Weiqiang Xiong
7 years ago Jun 24, 2015 4:13pm

I know I can use #BrowserWindowOpener and extend it with a button.

Is there anyway I can popup a window inside a buttonclick listener directly?

 

Weiqiang Xiong
7 years ago Jun 24, 2015 4:21pm

I have a table and a button. Then I select a row and click the button. In the clicklistener it will get the URL from selected row. Then it should pop up a new window with the URL.

How could I do this?

Claudio Crociati
7 years ago Jun 24, 2015 6:23pm

You can try the method open() in the class Page:
com.vaadin.server.Page.getCurrent().open(java.lang.String url, java.lang.String windowName)
com.vaadin.server.Page.getCurrent().open(java.lang.String url, java.lang.String windowName, boolean tryToOpenAsPopup)
com.vaadin.server.Page.getCurrent().open(java.lang.String url, java.lang.String windowName, int width, int height, BorderStyle border)