Hi!
I have copied this code from the nestedlist video tutorial and modified it a little. I am having this error :
  • Uncaught TypeError: Cannot read property 'length' of undefined
Here is my code :

My JSon

Code:
{
"items" : [
    {
        "id": 1,
        "name": "Ed Spencer",
        "email": "ed@sencha.com"
    },
    {
        "id": 2,
        "name": "Abe Elias",
       "email": "abe@sencha.com"
    }
]
}
My script

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