PDA

View Full Version : Store load exception



sumanb
24 Mar 2011, 4:07 AM
I am getting a store load exception every time I am trying to access it. Can I have some help ?

var subStore = new Ext.data.JsonStore({
autoLoad: false,
reader: new Ext.data.JsonReader({
idProperty: 'id',
root: 'value',
successProperty: 'success'
}, newColArr.fields),
proxy: new Ext.data.HttpProxy({
url : this.dataURL,
method: 'GET'
}),
listeners:{
exception: function(proxy, type, action, o, response, args){
if (type == "remote") {
console.log("Error", response.errors.reason);
} else {
console.log("Warning", " Cannot Load data");
}
}

}
});

subStore.on('load', function(r, options, success){
console.log(r);
});

subStore.load({ params : grid.paramObj });

fay
24 Mar 2011, 4:42 AM
What is the exception??? (What error message is appearing?) Have you checked what your server is returning with Firebug?

sumanb
24 Mar 2011, 8:21 PM
The server is returning the data in the proper format but it is available inside store.reader.jsonData, which I think ( if everything goes OK ) should also be available under store.data.items (currently showing an empty array) . The exception that I am getting is a console log in firebug saying "Warning Cannot Load Data" .