The code has
Code:
load : function(options){
options = options || {};
if(this.fireEvent("beforeload", this, options) !== false){
this.storeOptions(options);
var p = Ext.apply(options.params || {}, this.baseParams);
if(this.sortInfo && this.remoteSort){
var pn = this.paramNames;
p[pn["sort"]] = this.sortInfo.field;
p[pn["dir"]] = this.sortInfo.direction;
}
this.proxy.load(p, this.reader, this.loadRecords, this, options);
return true;
} else {
return false;
}
},
/**
* <p>Reloads the Record cache from the configured Proxy using the configured Reader and
* the options from the last load operation performed.</p>
* <p><b>It is important to note that for remote data sources, loading is asynchronous,
* and this call will return before the new data has been loaded. Perform any post-processing
* in a callback function, or in a "load" event handler.</b></p>
* @param {Object} options (optional) An object containing loading options which may override the options
* used in the last load operation. See {@link #load} for details (defaults to null, in which case
* the most recently used options are reused).
*/
reload : function(options){
this.load(Ext.applyIf(options||{}, this.lastOptions));
},
Try an override
Code:
Ext.override(Ext.data.Store, {
load : function(options){
// Use a copy of what the caller passed
options = Ext.apply({}, options);
if(this.fireEvent("beforeload", this, options) !== false){
this.storeOptions(options);
var p = Ext.apply(options.params || {}, this.baseParams);
if(this.sortInfo && this.remoteSort){
var pn = this.paramNames;
p[pn["sort"]] = this.sortInfo.field;
p[pn["dir"]] = this.sortInfo.direction;
}
this.proxy.load(p, this.reader, this.loadRecords, this, options);
return true;
} else {
return false;
}
},
/**
* <p>Reloads the Record cache from the configured Proxy using the configured Reader and
* the options from the last load operation performed.</p>
* <p><b>It is important to note that for remote data sources, loading is asynchronous,
* and this call will return before the new data has been loaded. Perform any post-processing
* in a callback function, or in a "load" event handler.</b></p>
* @param {Object} options (optional) An object containing loading options which may override the options
* used in the last load operation. See {@link #load} for details (defaults to null, in which case
* the most recently used options are reused).
*/
reload : function(options){
// Use a copy of what the caller passed
options = Ext.apply({}, options);
this.load(Ext.applyIf(options, this.lastOptions));
}
});