Background: I want to be able to create a custom error mask for ajax loading errors, for ex. in case of network problems.
I am using the following code to create to create a a new Ext JS store, whose proxy I would like to extend with my own afterRequest
function.
The afterRequest
function should send an afterload
event, which is used by a utility function calling mask()
on the widget.
var settingsStore = new Ext.data.Store({
model: 'vmSettings',
autoload: 'true',
proxy: {
type: 'ajax',
url: 'ta-debian-7-wheezy-virtualbox.json',
afterRequest: function(request, success) {
this.fireEvent('afterload', this, request, success);
return;
},
reader: {
type: 'json',
rootProperty: 'variables',
},
}
});
Now this code is loading withour error with Ext JS but fails on 5.1 with the message: Cannot override method afterRequest on Ext.data.proxy.Ajax instance
What could be wrong here ?