How do I open a window

Vaadin 6 window had a open() method. What replaced that in the UI?

How would I display a window after I add it to the UI?

Windows in Vaadin 7 are purely child windows, unlike Vaadin 6, so you cannot open these in a new browser window. What you can do is open an UI in a new browser window. See e.g.
this article
in the wiki.

But with BrowserWindowOpener you can’t use it with trees, so it is not as flexible as the vaadin 6 version was! :frowning:
see in addition this post:

Yes, that is true. You can still use the various…) methods, but that requires that you either have an URL or a Resource to open.

but if understand
post correctly:

“In any case, using to open new windows/tabs is pretty much deprecated; BrowserWindowOpener is the correct tool for that.”

so what know? :rolleyes:

Well there are 5 open(…) methods in the Page class and at least in V7RC2 only the ones which take a Resource as parameter has been deprecated. I think the other ones can be used without worries and honestly don’t know what the “pretty much deprecated” means in the post you linked. Maybe Johannes can comment on that.

is there a way to set Parameters with Page like in BrowserWindowOpener ( openernew.setParameter(“parameter”,parameter); )?

Seems there’s no “proper” way. I guess you could just add them to the URL you provide yourself, e.g. ?foo=bar.

hmm… if i use
Page p = UI.getCurrent().getPage();,url)…
it starts a new BrowserWindow, thats ok
… but every call of changes only the content in the new BrowserWindow and did not start another BrowserWindow
is there a way to start a new BrowserWindow on every call?

thank you

If you use the same window name (the second parameter) more than once, the client will attempt to open the new URL into the same window (assuming there’s a window with that name). So if you want new windows to be created, you should use a unique windowName parameter for each call.

thank you … works fine…
but the url-parameter version is not so pretty :frowning:
the BrowserwindowOpener-Version I like better. but for now it is ok!
thank you!

Thanks For the reply.

I get that part, but I want to set content of an UI to a window. I’m migrating from vaadin 6 to 7 and I have bunch of Vaadin 6 Window that were opened in the same browser window depending what the user selected from a menubar. But now I can’t setContent of a UI with a Window and if I add it, it’s all messed up.

I changed them Panel and so far it’s working.