PDA

View Full Version : 13521 config.xtype is not a constructor [I read over all the exisiting posts ...]



chbfiv
16 Oct 2009, 10:26 AM
13521 config.xtype is not a constructor

[FEAppFormPanel.js] - loaded and in memory verified by FireBug


FEAppFormPanel = Ext.extend(Ext.FormPanel, {
initComponent:function() {
FEAppFormPanel.superclass.initComponent.call(this);
}
});

Ext.reg('feappformpanel', FEAppFormPanel);


then
[FEApp.js]


//... in one of my panels, I replace xtype: 'form'
// with my new xtype: 'feappformpanel'
...A TabPanel,
items: [{
xtype: 'feappformpanel',
title: 'Contact',
...
}],
... rest of TabPanel


The above, xtype: 'form', has worked for me for months but I decided to move the FormPanel to its own file. I can still simply change the FormPanels lazy init back to xtype: 'form', and everything works like normal. I stripped to nothing and I can't figure out what the issue is. I've read all of the ExtJs topics on this, everything from your xtype needs to be a string, and you need to include the js file that registers the new class. I apologize if it turns out to be something simple, but it has already wasted half of a day=(

ps: the API documentation has FormPanel in Ext.form.FormPanel, in my Netbeans it comes up under Ext.FormPanel. I looked in the src dir and see it's registered under, Ext.form.FormPanel. But all the documents, posts, ... I've looked at use Ext.FormPanel. The reason I'm pointing this out is that I'ved tried both, and the both raise the same exception.

jarlau
16 Oct 2009, 6:01 PM
the ] was copied from your code or just typo?


//... in one of my panels, I replace xtype: 'form'
// with my new xtype: 'feappformpanel'
...A TabPanel,
items: [{
xtype: 'feappformpanel'],
title: 'Contact',
...
}],
... rest of TabPanel

chbfiv
19 Oct 2009, 1:10 PM
sorry for the late reply. I decided to just add my custom Form functions inline with the lazy loading items instead of extending the form. That was a typo during my post. I'm still interested feedback=)