javascript - Uncaught Error: [Ext.create] Unrecognized class name / alias: MyApp.store.LibraryFolderTreeStore -
i'm migrating ext js 4 ext js 5.1
.i have code in extjs 4.2.1 giving console error after upgrading extjs 5.1 .it working in extjs 4.2.1, don't know why giving error, saying
uncaught error: [ext.create] unrecognized class name / alias: myapp.store.libraryfoldertreestore
ext.define('myapp.view.library.librarytreeview', { extend : 'ext.tree.panel', alias : 'widget.librarytreeview', requires: [ 'myapp.store.libraryfoldertreestore' ], store : ext.create("myapp.store.libraryfoldertreestore") // getting error on line .... });
you cannot use ext.create
while defining class.
you have use initcomponent
method in can assign config using ext.create
.
ext.define('myapp.view.library.librarytreeview', { extend : 'ext.tree.panel', alias : 'widget.librarytreeview', requires: [ 'myapp.store.libraryfoldertreestore' ], initcomponent : function(){ this.store = ext.create("myapp.store.libraryfoldertreestore"); this.callparent(); } // getting error on line .... });
Comments
Post a Comment