Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ExtJS FormPanel in a FormPanel fails with "this.body is null"

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();
like image 397
John K Avatar asked Jul 21 '09 17:07

John K


1 Answers

I'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'.

like image 79
Ballsacian1 Avatar answered Oct 16 '22 16:10

Ballsacian1