Hi there,
I have a Problem with the pagingmemoryproxy. I tried to receive a json file from the server. I want to load a json file in a grid. That look as follows:
Code:
store : new Ext.data.Store({
remoteSort: true,
proxy: new Ext.ux.data.PagingMemoryProxy(new Ext.data.HttpProxy({url: 'http://localhost:8080/test/jsp/js/extjs/ext-3.1.1/examples/experiments/protocolmask/products.json'})),
listeners : {
loadexception : console.log
},
reader: new Ext.data.JsonReader({
root : "rows",
totalProperty : 'totalCount',
listeners : {
loadexception : console.log
},
fields : [{
name : 'name'
}, {
name : 'id'
}, {
name : 'status'
}, {
name : 'user'
}, {
name : 'startdate',
type : 'date',
dateFormat : 'n/j h:ia'
}, {
name : 'enddate',
type : 'date',
dateFormat : 'n/j h:ia'
}, {
name : 'desc'
}, {
name : 'imageLink'
}, {
name : 'error'
}]
})
}),
I load the store at the latest possible moment
Code:
this.on({
afterlayout : {
scope : this,
single : true,
fn : function() {
this.store.load({
params : {
start : 0,
limit : 10
}
});
}
}
});
But always I get this error message:
Object { api=Object, more...} Object { params=Object} null TypeError: root is undefined { message="root is undefined", more...}
What am I doing wrong?
Best regards
Azami