Did vaadn recognize browser tabs only for main window

Hello,

As I see in AbstractCommunicationManager#doGetApplicationWindow
vaadin checks only main window for uniquness (e.g. when requesting the url http://somedomain.com/).

And if i have some “sub” window:
Window window = MySubWindow()
window.setName(“sub”)

For all tabs vaadin will alwas return the same instance of window (e.g. when requesting the url http://somedomain.com/sub)

Am I right that vaadin recognize browser tabs only for main window? If so, why not to make it work for other windows too?

I think I might’ve not understood your question entirely, but I’ll just say that it is possible to show other windows than the main window in different tabs. The code snippet you posted looks correct, but you will also need to add the window to the Application (i.e. myApplicationInstance.addWindow(window)). Then the URL might work. Might be something I missed, though, and I didn’t test this (no time, sorry).

Thank you for reply and sorry for bad explanation.

I’ll try to describe the problem better:
vaadin can detect new browser tabs - in this case it appends _N to window name passed to Applicatrion#getWindow.

Both navigator7 and navigator use this to detect new tabs and instantiate new window for new tab.

But this works only for main window (window attached to application with setMainWindow()), and for other windows (window’s with name (e.g. “sub”) and attached to application with addWindow() ) Applicatrion#getWindow always receive simple window name (e.g. “sub” when accessing localhost/appContext/sub).

So the problem is: i can’t detect when not main window (subwindow) is opened in new browser tab to create new window instance (and avoid synchronization errors for two tabs)

I assume this is not a bug, but feature request, so i have created a ticket for this (with sample app to demonstrate issue): http://dev.vaadin.com/ticket/5483

Ah, now I see. Thanks for the ticket!