Opened 11 years ago

Last modified 11 years ago

#7212 closed defect

Can't attach TabContainer or Tree programmatically to an expando in ightly build of 7/15/08 — at Initial Version

Reported by: spidey2099 Owned by: Adam Peller
Priority: high Milestone: 1.2
Component: Dojox Version: 1.1.1
Keywords: Cc:
Blocked By: Blocking:

Description

A TabContainer?, AccordionContainer? or Tree can be attached programmatically to an ExpandoPane? in dojo-release-1.1. However, in the nightly build, this is no longer true. Here is the code: <code> var parent = document.getElementById ("container0"); 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", attachParent : "true", id : cid

}, div); tabContainer.domNode.height = "400px"; tabContainer.domNode.width = "275px";

var cp1 = new dijit.layout.ContentPane? ( {

id : cid + ".1", title : "CP1"

}); cp1.domNode.style.height="400px"; 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="400px"; cp2.setContent("Content for CP2"); tabContainer.addChild(cp2);

tabContainer.startup();

} </code>

Has something changed? Do we need to attach nodes to the expando differently now?

Change History (1)

Changed 11 years ago by dante

Attachment: ep-prog.html added

fixed version

Note: See TracTickets for help on using tickets.