mercredi 17 septembre 2014

Custom panel is not a constructor issue.

initialize a panel with ExtJS 3.4

Code:



custom.CustomPanel = Ext.extend(Ext.Panel, {
constructor: function(config) {
config = config || {};
Ext.apply({
layout: 'form',
labelAlign: 'left',
defaultType: 'textfield',
width: 600,
height: 500,
items: [
grid
],
}, config );
custom.CustomPanel.superclass.constructor.call(this, config);
};
})

and implementing with this way

Code:



some.elseCustomPanel = new custom.CustomPanel({
region:'center',
border: '1px'
});

and gives error `custom.CustomPanel` is not a constructor

what I am missing?






Custom panel is not a constructor issue.

Aucun commentaire:

Enregistrer un commentaire