Opening a pop-up dependent on server processing

Our application has a Button that causes the server to retrieve some data. Dependent on some other settings in the window (made via other UI components), this is either displayed as a Table in the Window, or opens up in a PDP in another window. The decision to open as a pop-up is made by the server.

Converting to Vaadin 7 from Vaadin 6, I can’t find a way to do this i.e. open a pop-up dependent on the outcome of some server processing/settings. BrowserWindowOpener won’t do it because the decision to open the pop-up is dependent on some processing on the server, and BrowserWindowOpener is client based, and fixed as the time the window is displayed. I can’t use a Link for similar reasons - it’s not known that the Link wil be needed until the operation is submitted to the server, and the pop-up must be the result of that operation

Is there any way to open a new UI window from the server with content defined by a StreamResource ?

Thanks!