Reputation: 916
I'm working with vaadin, I want to generate a report when user click the button,My report is within the application,I want to open the report within new browser window. When I try to do that, it opens the window but shows the same window I'm currently in. I used "open()" method to open new window and to for the report path I used "ExternalResource". Here is my code
mainWindow.getWindow().open(
new ExternalResource("http://localhost:8080/myapp/reports/report.rptdesigng"),
"_blank", // window name
500, // width
200, // weight
Window.BORDER_NONE // decorations
);
Upvotes: 0
Views: 3813
Reputation: 2118
There are different types of resources in Vaadin. Take a look at chapter about available Resource types in the Book of Vaadin.
If you use the ExternalResource it only forwards the window to that URL. And unless you have registered an URIHandler in your window, it only shows the main window instead.
So basically you have two options:
Of course there is also possibility to open another Vaadin managed window (i.e. composed of Vaadin components). You can find information and code samples about windows in the Sampler.
Upvotes: 4