Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
OpenLayers tabsheet
hi,
I have some problem with openlayers in the tabsheets
package com.example.demomap;
import org.vaadin.vol.OpenLayersMap;
import org.vaadin.vol.OpenStreetMapLayer;
import com.vaadin.ui.Component;
import com.vaadin.ui.TabSheet;
import com.vaadin.ui.TabSheet.SelectedTabChangeEvent;
import com.vaadin.ui.TabSheet.Tab;
import com.vaadin.ui.VerticalLayout;
public class TabSheetClosingExample extends VerticalLayout implements
TabSheet.SelectedTabChangeListener, TabSheet.CloseHandler {
private TabSheet t;
public TabSheetClosingExample() {
//
t = new TabSheet();
t.setHeight("500px");
t.setWidth("500px");
for(int i=0; i<10; i++){
OpenLayersMap map = new OpenLayersMap();
final OpenStreetMapLayer osm = new OpenStreetMapLayer();
map.addLayer(osm);
map.setWidth("100px");
map.setHeight("100px");
Tab tab = t.addTab(map,i);
tab.setClosable(true);
}
t.addListener(this);
t.setCloseHandler(this);
t.setImmediate(true);
addComponent(t);
}
public void selectedTabChange(SelectedTabChangeEvent event) {
TabSheet tabsheet = event.getTabSheet();
Tab tab = tabsheet.getTab(tabsheet.getSelectedTab());
if (tab != null) {
getWindow().showNotification("Selected tab: " + tab.getCaption());
}
}
public void onTabClose(TabSheet tabsheet, Component tabContent) {
tabsheet.removeComponent(tabContent);
}
}
when i close a previews tab, openlayers make a javascript error
JavaScriptException: (NOT_FOUND_ERR): NOT_FOUND_ERR: DOM Exception 8
code: 8
INDEX_SIZE_ERR: 1
DOMSTRING_SIZE_ERR: 2
HIERARCHY_REQUEST_ERR: 3
WRONG_DOCUMENT_ERR: 4
INVALID_CHARACTER_ERR: 5
NO_DATA_ALLOWED_ERR: 6
NO_MODIFICATION_ALLOWED_ERR: 7
NOT_FOUND_ERR: 8
NOT_SUPPORTED_ERR: 9
INUSE_ATTRIBUTE_ERR: 10
INVALID_STATE_ERR: 11
SYNTAX_ERR: 12
INVALID_MODIFICATION_ERR: 13
NAMESPACE_ERR: 14
INVALID_ACCESS_ERR: 15
VALIDATION_ERR: 16
TYPE_MISMATCH_ERR: 17
SECURITY_ERR: 18
NETWORK_ERR: 19
ABORT_ERR: 20
URL_MISMATCH_ERR: 21
QUOTA_EXCEEDED_ERR: 22
TIMEOUT_ERR: 23
INVALID_NODE_TYPE_ERR: 24
DATA_CLONE_ERR: 25
have any idea?