PDA

View Full Version : JSON on to NestedList not working



stirucherai
28 Aug 2011, 8:38 AM
Following code always gives "Uncaught TypeError : Cannot read property 'length' of undefined". Please help to solve the problem
Ext.regModel('ListItem', {
fields: [
{name: 'text', type: 'string'},
{name: 'info', type: 'string'},
{name: 'model', type: 'string'},
{name: 'items', type: 'auto'},
{name: 'duration', type: 'auto'},
]});



var store = new Ext.data.TreeStore({
model: 'ListItem',
proxy: {
type: 'ajax',
url: 'heading.json',
reader: {
type: 'tree',
root: 'items',
}
},
autoLoad: true});