Same User on Different Browser Tabs

[font=Verdana]
[size=4]
[font=Tahoma]

Hi!

I’m trying to figure out the session management of Vaadin. I wanna let my users to use applications different pages on the browser tabs. Now it’s giving “Out of Sync, Something has caused to be out of sync with the server. Take note of any unsaved data , and click here to re-sync…” error. How can I fix that? Or is there any way to block the application to not to open a new browser tab?

I’m sorry if this question has already been asked, but I couldn’t find similar subject on forum.

Thank you!

[/font]
[/size]
[/font]

Hi,

You can only ever support one Vaadin application in a browser instance - this is because browsers only allow one session per browser instance, and Vaadin stores it’s application in the session. You can, though, have multiple windows belonging to the same application open in different tabs : see
https://vaadin.com/web/joonas/wiki/-/wiki/Main/Supporting+Multible+Tabs
for details.

Cheers,

Charles.

You should be able to open them, but you need to use the Vaadin APIs to open the other browser windows/tabs using code like the following in your MainWindow class:

		Window w = new Window("window title");
		w.setSizeFull();
		// Configure the windows layout; by default a VerticalLayout
        VerticalLayout layout = (VerticalLayout)w.getContent();
        layout.setMargin(false);
        layout.setSpacing(false);
        layout.setSizeFull();
       // create view window should display
        w.addComponent(theNewView);
        vaadinApp.addWindow(w);
        open(new ExternalResource(w.getURL()),"_blank");