我有一个相当复杂的设置,我已经总结到下面的代码。我有一个外部FormPanel,其中我试图包含一个组件,它是一个子类FormPanel。在FF中,它会导致"this.body为空“错误。
这是发生在其他人身上吗?能让这件事成功吗?我非常不想去触摸子类,如果没有必要的话。
var test = new Ext.Window({
title: 'test',
items: [{
xtype: 'form',
items: [{
// this is where the subclass of FormPanel goes
xtype: 'form',
items: [{
xtype: 'textfield',
fieldLabel: 'Testing'
}]
}]
}]
});
test.show();发布于 2009-07-21 17:16:14
我不确定这是否是您的确切问题,但我知道您不应该将xtype:'form‘嵌入到xtype:'form’中。如果您需要它的布局功能,那么就不要使用xtype:'form',而是使用xtype:'panel‘加上布局:'form’。
发布于 2009-07-22 07:34:35
实际上,您正在尝试将一个FormPanel嵌入到另一个FormPanel中。这不管用。我想你想要的是:
var test = new Ext.Window({
title: 'test',
items: [{
xtype: 'form',
items: [{
xtype: 'textfield',
fieldLabel: 'Testing'
}]
}]
});
test.show();发布于 2009-07-22 14:53:37
我想如果你加了什么就行了(f.e。(隐藏的textfield)进入第一个“表单”。
https://stackoverflow.com/questions/1160496
复制相似问题