我创建了一个带有几个选项卡的选项卡面板,当我尝试实施甘特图(需要dom创建)时,我总是看到panel.body是未定义的,即使我向面板添加了一些东西...ExtJS Ext.panel.body未定义。为什么?
...},{
title: "Descriptions View",
id: 'dviewTab',
iconCls: 'icon-desc',
autoWidth: true,
forceLayout: true,
header: false,
xtype: 'panel',
items: [ {xtype: 'textfield', value: 'testing'} ] // so we have something in the 'body'
},{....}
然后面板被创建后我做
var uiPanel = Ext.getCmp('dviewTab');
if (uiPanel.body)
{
// never gets here :(
} // if
else
{
this.logger("uiPanel.body is undefined.... WHY??");
}
我可以看到萤火虫的面板,看起来它应该,但我没有看到一个体场,如果是相关的“元素'面板的价值是“身体”。 我不明白为什么它是未定义的,请帮助。
感谢这解释了为什么当它是活动选项卡时它工作正常。 – Crushing