Hi!
I have copied this code from the nestedlist video tutorial and modified it a little. I am having this error :
Here is my code :
- Uncaught TypeError: Cannot read property 'length' of undefined
My JSon
My scriptCode:{ "items" : [ { "id": 1, "name": "Ed Spencer", "email": "ed@sencha.com" }, { "id": 2, "name": "Abe Elias", "email": "abe@sencha.com" } ] }
Code:Ext.regModel('listItem', { fields: ['id','name','mail'] }); listStoreItem = new Ext.data.TreeStore({ model: 'listItem', proxy: { type: 'ajax', url: '/public/models/contacts.json', reader: { type: 'tree', //Parceque c'est une NestedList root: 'items' } } }); Viewport = Ext.extend(Ext.NestedList, { fullscreen: true, title: "Contacts list", store: listStoreItem }) NestedListDemo = new Ext.Application({ name: "NestedList", launch: function() { viewport = new Viewport(); } });
Can anyone help me with that? Thanks