admin管理员组文章数量:1220947
I have a rather complicated setup which I have boiled down to the code below. I have an outer FormPanel, where I am trying to include a component that is a sub-class FormPanel. In FF it is causing a "this.body is null" error.
Is this happening to anyone else? Is it possible to get this to work? I very much do not want to have to touch the subclass if I don't have to.
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();
I have a rather complicated setup which I have boiled down to the code below. I have an outer FormPanel, where I am trying to include a component that is a sub-class FormPanel. In FF it is causing a "this.body is null" error.
Is this happening to anyone else? Is it possible to get this to work? I very much do not want to have to touch the subclass if I don't have to.
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();
Share
Improve this question
asked Jul 21, 2009 at 17:12
John KJohn K
3851 gold badge2 silver badges11 bronze badges
4 Answers
Reset to default 15I'm not sure if this is your exact issue, but I do know you are never supposed to embed an xtype: 'form' into an xtype: 'form'. If you need its layout functionality then instead of xtype: 'form', use xtype: 'panel' with layout: 'form'.
I think it would work if you added something (f.e. hidden textfield) into first 'form'.
Extjs doesn't stop you from needing to understand HTML. You can't have nested forms.
You are essentially trying to embed a FormPanel inside another FormPanel. This will not work. I think what you want is this:
var test = new Ext.Window({
title: 'test',
items: [{
xtype: 'form',
items: [{
xtype: 'textfield',
fieldLabel: 'Testing'
}]
}]
});
test.show();
本文标签: javascriptExtJS FormPanel in a FormPanel fails with quotthisbody is nullquotStack Overflow
版权声明:本文标题:javascript - ExtJS FormPanel in a FormPanel fails with "this.body is null" - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1739331433a2158499.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论