Take the 2-minute tour ×

Gurus, I am new to JS. I am getting an error, "Unable to find method createEntitlementTree". Can you please help how I should be writing and invoking this method? Thanks in advance for your help.

Ext.define('Myviews.UserGroupManagerPanel', {
    extend: 'Ext.panel.Panel',
    createUserGroupForm: function(){
        this.gridPanel = Ext.create( 'Ext.FormPanel', {
            region: 'center',
            collapsible: false,
            floatable: false,
            items: [
                    xtype: 'textfield',
                    name: 'userGroupName',
                    fieldLabel: 'User Group Name',
                    width: 210
        return this.gridPanel;
    createEntitlementTree: function() {
        return Ext.create( 'Ext.tree.Panel', {
            border: true,
            rootVisible: false,
            useArrows: true,
            frame: true,
            title: 'Entitlements',
            width: 300,
            height: 350,
            initComponent: function() {
                this.store = Ext.create( 'Ext.data.TreeStore', {
                    proxy: {
                        type: 'ajax',
                        url: '/TradeHubSVN/admin/getAllEntitlements.json'
                this.callParent( arguments);
share|improve this question
Extraneous code should be removed from samples, with an eye towards making them complete, concise & representative. –  outis Dec 28 '11 at 6:15
SO uses a Q&A site, rather than a forum. Comments aren't meant for general messaging. If an answer is helpful, up-vote it. If it resolves your issue, accept it. Consider picking a meaningful username. One advantage to this is others can use at-replies and you'll get a notification that someone has addressed you in a comment. –  outis Dec 31 '11 at 20:13
add comment

1 Answer

createEntitlementTree() has to be called in the context of an object of the right type. You can't just call it all by itself like you are trying to do.

I don't really understand how createUserGroupForm() is invoked, but you may need this.createEntitlementTree() or obj.createEntitlementTree() where obj is an object of the right type in order to call createEntitlementTree() in the createUserGroupForm() method.

share|improve this answer
Thank you jfriend. Changing it to this.createEntitlementTree() did the trick. Thanks a lot. –  user1054725 Dec 30 '11 at 2:59
add comment

Your Answer


