0
我試圖產生TabContainer的,並把它添加到對話的dijit programmaticaly:添加到TabContainer的對話框programmaticaly
gridsDiv = domConstruct.create('div');
gridsDiv_inner = domConstruct.create('div', { id: 'gridsDiv_innerId', style: "width: 600px; height: 600px" });
var tc = new TabContainer({
style: "height: 100%; width: 100%;"
}, "gridsDiv_innerId"
);
var cp1 = new ContentPane({
title: "Food",
content: "We offer amazing food"
});
tc.addChild(cp1);
var cp2 = new ContentPane({
title: "Drinks",
content: "We are known for our drinks."
});
tc.addChild(cp2);
tc.startup();
gridsDiv.appendChild(gridsDiv_inner);
dialogWindow = new Dialog({
title: 'Attribute data',
content: gridsDiv,
'class': 'nonModal',
style: "width: 600px"
});
上面的代碼返回一個空對話框。我需要通過this example中的標記實現相同的功能,但我需要動態生成製表符及其內容。
是的,正是我想念的,謝謝! – Matej