PDA

View Full Version : Call back function of Ext.data.AjaxProxy not working



ashu2289
23 Oct 2013, 11:14 PM
I am looking for a callback function of proxy which tells me that the data is received from the server, reading and loading that data comes later on. I need something equivalent to success/failure callback functions of XHR.


store:Ext.create('Ext.data.Store', {
model:'User',
autoLoad: true,
proxy:{
url:this.contextPath + '/ajax/getSomething.ajax',
type:'ajax',
actionMethods:{
read:'POST'
},
callback:callMyFunctionHere,
scope:this
}
}

evant
23 Oct 2013, 11:29 PM
Ext.create('store', {
// other options
listeners: {
load: function() {
// Do something
}
}
});

ashu2289
24 Oct 2013, 9:13 AM
Store load event is different than what I am looking for.

"afterRequest" event served the purpose, which is triggered as the proxy url receive the data at client end.

Store load is would come into picture when reader has done reading the data and loads it into the store of component.

Thanks anyways