Results 1 to 3 of 3

Thread: Uncaught TypeError: Cannot read property 'idProperty' of undefined

  1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    1
    Vote Rating
    0
      0  

    Default Uncaught TypeError: Cannot read property 'idProperty' of undefined

    I have a very simple app. For some reason i'm getting this error message Uncaught TypeError: Cannot read property 'idProperty' of undefined

    Can someone tell me why?



    Ext.Loader.setConfig({ enabled: true });


    Ext.application({
    name: 'DeviceControl',
    appFolder: '../Scripts/DeviceControl',


    controllers: ['DeviceControl.controller.CDevice'],




    autoCreateViewport: true,
    launch: function ()
    {


    //this is to be fired as soon as the page is ready

    }
    });



    Ext.define('DeviceControl.view.Viewport', {
    extend: 'Ext.container.Viewport',
    layout: 'fit',


    requires: [
    'DeviceControl.view.VDevice',

    ],


    initComponent: function ()
    {
    this.items =
    {

    items: [{
    width: 250,
    xtype: 'DeviceView'

    }]

    };


    this.callParent();
    }
    });


    Ext.define('DeviceControl.view.VDevice',
    {
    extend: 'Ext.form.Panel',
    alias: 'widget.DeviceView',
    store: ['DeviceControl.store.SDevice'],




    //controls go here



    initComponent: function ()
    {
    this.items =
    [
    {
    xtype: 'button',

    id:'HBtn'


    }

    ]


    this.callParent(arguments);
    }
    });


    Ext.define('DeviceControl.model.MDevice', {
    extend: 'Ext.data.Model',
    // requires: 'DeviceControl.classes.jsonDeviceProxy',
    fields: [
    { name: 'DeviceId', type: 'int' },
    { name: 'Heading', type: 'string' }
    ]
    // hasMany: { model: 'Command', name: 'commands' }


    });


    Ext.define('DeviceControl.store.SDevice', {
    extend: 'Ext.data.Store',
    requires: ['DeviceControl.model.MDevice'],
    model: ['DeviceControl.model.MDevice'],
    autoLoad: true,


    proxy:
    {


    type: 'ajax',
    url: 'data/ControlPage.json',
    headers: { 'Content-Type': 'application/json; charset=utf-8', 'Accept': 'application/json' },
    reader:
    {
    type: 'json',
    root: 'results',
    successP:'success'
    }


    },


    load: function ()
    {


    console.log('store');


    }
    });



    Data:

    {
    'success': true,
    'results':
    [
    {
    'DeviceId': '7',
    'Heading': 'Stevie Ray Vaughan',

    }


    ]
    }

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,551
    Vote Rating
    1271
      0  

    Default

    Ext JS 4?
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Apr 2011
    Location
    Hyderabad
    Posts
    27
    Vote Rating
    2
      0  

    Default Uncaught TypeError: Cannot read property 'idProperty' of undefined

    Hi,

    I got the same error in ExtJs4.1.

Posting Permissions

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