Hi,
In Firefox - when a TabContainer is attached pro programmatically to an expando, it does not display. However, when the expando is closed and then re-opened, the tab container will appear, then fade out. I have tried various ways of attaching the tab container to the expando including putting in inside a content pane. No joy. Interestingly, an AccordionContainer appears to work just fine. Is this a known bug?
Here is the code:
var bc = new dijit.layout.BorderContainer ( {
style : "width:500px; height:450px; border:2px solid black",
id : "0"
} );
bc.startup();
dojo.byId (parent.id).appendChild (bc.domNode);
var div = document.createElement ("div");
dijit.byId (bc).domNode.appendChild (div);
var ep = new dojox.layout.ExpandoPane ( {
title : "ep Test",
region : "right",
id : "1",
style : "width:250px; height:275px;"
}, div);
ep.startup();
bc.addChild (ep);
constructTabContainer(ep, "2");
function constructTabContainer(parent, cid) {
console.log ("Parent id: " + parent.id);
var div = document.createElement ("div");
dijit.byId(parent).domNode.appendChild (div);
var tabContainer = new dijit.layout.TabContainer ( {
tabPosition : "bottom",
id : cid
}, div);
tabContainer.domNode.width = "275px";
var cp1 = new dijit.layout.ContentPane ( {
id : cid + ".1",
title : "CP1"
});
cp1.domNode.style.height="80px";
cp1.domNode.style.border="2px solid red";
cp1.setContent("Content for CP1");
tabContainer.addChild(cp1);
var cp2 = new dijit.layout.ContentPane ({
id : cid + ".2",
title : "CP2"
});
cp2.domNode.style.height="60px";
cp2.setContent("Content for CP2");
tabContainer.addChild(cp2);
tabContainer.startup();
}Also - folks, when a programming model has changed, it would be great to have examples of the change. And I don't mean API usage, I mean a programming model - the methodology to instantiate and wire components programmatically. Without this, we are left to divine (or guess) the intentions of the dojo developers. And guessing at intent is not only a bad idea, it also leads to long, laborious hours of testing and frustration. And some of these questions are only placed after hours of testing in this fashion. And in the notable absence of usable documentation, it is greatly appreciated when someone responds to our questions in the forum.
Thanks,
John
