The tree panel doesn't get rendered Code is :
Ext.define('mainPanel',{
extend:'Ext.form.Panel',
layout: {
type: 'hbox',
align: 'stretch'
},
width:'100%',
height:'100%',
title:'SQL',
initComponent:function()
{
var tableDiv = this.getTableColumn();
var analyzerDiv = this.getAnalyzerColumn();
var fieldDiv = this.getfieldColumn();
this.items=[tableDiv,analyzerDiv,fieldDiv];
this.callParent();
},
getTableColumn:function()
{
var TableColumn = Ext.create('Ext.tree.Panel',{
title:'Tables',
width:'20%',
heigth:'100%',
layout: 'fit',
border:true,
store: tableTreeStore,
rootVisible: false
});
return TableColumn;
}
Pls let me know where i am going wrong. Thanks in advance the error i get is
TypeError: c is not a constructor return new c(a[0])
Please check this Sencha fiddle that i created for you.
This error exists when you are trying to override
initComponentin default component of Extjs.For example:
Or
If you want eradicate this error from your code you need to for example define your custom
Component - CustomPanelthat extendExtjscomponent:And somewhere in your code - creation of
CustomPanel:Hope this is something that you were looking for.