Open new browser tab without extending a component

Hi,
I’m migrating an application from 6 to 7 and I’m trying to open a report in a new browser tab. I read about BrowserWindowOpener, but I want to open new tab without extending buttons or links. In Vaadin 6 I had:

getWindow().open(resource, "_new"); now I try to convert this in:

Page.getCurrent().open(resource, "_new",false); but open() is deprecated. What is the best way to do it?
Thank you, Francesco

You might just want to use Page.open(), but you should also be aware of its shortcomings (that existed in Vaadin 6 as well):

  • Browsers may block new windows/tabs that are not opened by direct user action
  • The resource will be session-global and cannot be garbage collected for a while

These two issues are the reason BrowserWindowOpener exists; unfortunately it has its own disadvantages. We won’t remove Page.open() until someone comes up with a truly better solution.