TabSheet DOM

I’ve made a simple OpenLayers Map component based on a AbstractJavaScriptComponent. It works like a charm and there’s just a few lines of code.

How ever, as soon as I put my component inside a TabSheet it just dies, the DOM-tree is no longer altered by the OpenLayers.

The js file in short…

com_jockes_addons_openmap_OpenMap = function ()
{
var elementId = this.getState().elementId;
var theElement = document.createElement(‘div’);

theElement.setAttribute('id', elementId)
theElement.style.width = "100%"
theElement.style.height = "100%"
theElement.style.overflow = "hidden"

this.getElement().appendChild(theElement);
var map = new OpenLayers.Map(elementId);
var base = new OpenLayers.Layer.OSM();
map.addLayer(base);
map.zoomToMaxExtent();

}

Any ideas?

Brgds
Joakim