Results 1 to 3 of 3

Thread: Uncaught TypeError: Cannot call method 'getProxy' of undefined

  1. #1
    Sencha Premium Member
    Join Date
    Jul 2012
    Posts
    48

    Default Uncaught TypeError: Cannot call method 'getProxy' of undefined

    Ext.define('project_val',{
    extend:'Ext.data.Model',
    fields:['success'],
    proxy:{
    type: 'ajax',
    url:'resource/json/result.json',
    reader:{
    type:'json',
    root:'root'
    }
    },
    hasmany: {model:'items',name:'items'}
    });

    var project_val = Ext.create('Ext.data.Store', {
    model: 'project_val',
    autoLoad : true,
    /*proxy:{
    type: 'ajax',
    //url:'resource/json/result.json',
    api:{
    read:'resource/json/result.json'
    }
    }*/
    });

    I use grid as view
    but my app show this message
    'Uncaught TypeError: Cannot call method 'getProxy' of undefined '

    please help me.

  2. #2
    Sencha User
    Join Date
    Jan 2012
    Posts
    1,376
    Answers
    347

    Default

    I have tried your code with Ext 4.1.1 and Chrome and did not encounter the error you mentioned.
    Code:
    Ext.onReady(function(){
        Ext.define('project_val',{
            extend:'Ext.data.Model',
            fields:['success'],
            proxy:{
                type: 'ajax',
                url:'resource/json/result.json',
                reader:{
                    type:'json',
                    root:'root'
                }
            },
    //        hasmany: {model:'items',name:'items'}
            hasMany: {model:'items',name:'items'}
        });
    
    
    
        var project_val = Ext.create('Ext.data.Store', {
            model: 'project_val',
            autoLoad : true,
            /*proxy:{
            type: 'ajax',
            //url:'resource/json/result.json',
            api:{
            read:'resource/json/result.json'
            }
            }*/
        });
    });

  3. #3
    Sencha Premium Member
    Join Date
    Jul 2012
    Posts
    48

    Default thanx...

    thanx.
    i'm new to Extjs.
    it's my fault.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •