views:

319

answers:

1

Why can't I instantiate an Ext.form.CompositeField in extJS? Firebug tells me "CompositeField is not a constructor". My code:

var f = new Ext.form.CompositeField({
    labelWidth: 120,
    items: [
    {
 xtype : 'label',
 fieldLabel: new_attr_name,
    },
    {
        xtype     : 'label',
        fieldLabel: new_attr_display_name,
    },
    {
        xtype     : 'label',
        fieldLabel: new_attr_type,
    }
    ]
});
+2  A: 

That error means you either have an include issue, or you're using an older version of Ext. Check the Net tab in Firebug and make sure you have no red lines indicating include files that did not load. Also make sure that you've included all the proper Ext files and that Ext is version 3.2+.

bmoeskau
You are the golden god! Yeah, I was using version 3.1. Thanks!!!!
maximus