Hello,
I read the numerous post regarding adding multi-tab browser support for an application.
I’ve tried to add this support in my application by adding the following code to my Application class:
// Overriding getWindow(String) is required to get multiple browser
// windows/tabs to work
@Override
public Window getWindow(String name) {
// If the window is identified by name, we are good to go
Window w = super.getWindow(name);
// If not, we must create a new window for this new browser window/tab
if (w == null) {
w = new Window(name);
// Use the random name given by the framework to identify this
// window in future
w.setName(name);
addWindow(w);
// Move to the url to remember the name in the future
w.open(new ExternalResource(w.getURL()));
}
return w;
}
When I try to navigate to my application, the application does not show up and instead a blank screen is shown as well a JSON UIDL file attempts to download. I’ve tried this on Firefox on both PC and Mac.
Here is the contents of the file that is downloaded:
for(;;);[{"changes":[["change",{"format": "uidl","pid": "PID0"},["0",{"id": "PID0","height": "667px","width": "1436px","caption": "","name": "UIDL","theme": "csmc","resizable":true,"layoutRelativeWidth":true,"v":{"scrollLeft":0,"scrollTop":0,"positionx":-1,"positiony":-1,"close":false}},["1",{"id": "PID1","cached":true}]
]]], "meta" : {}, "resources" : {}, "typeMappings" : { "com.vaadin.ui.Window" : 0 , "com.vaadin.ui.VerticalLayout" : 1 }, "locales":[]}]
Is there something I am doing wrong?
Thanks,
Ajay