An example of the difference between store.load and store.reload in ext

  • 2020-03-30 03:22:15
  • OfStack

 
reload : function(options){ 
this.load(Ext.applyIf(options||{}, this.lastOptions)); 
}, 

 
load : function(options) { 
options = Ext.apply({}, options); 
this.storeOptions(options); 
if(this.sortInfo && this.remoteSort){ 
var pn = this.paramNames; 
options.params = Ext.apply({}, options.params); 
options.params[pn.sort] = this.sortInfo.field; 
options.params[pn.dir] = this.sortInfo.direction; 
} 
try { 
return this.execute('read', null, options); // <-- null represents rs. No rs for load actions. 
} catch(e) { 
this.handleException(e); 
return false; 
} 
}, 

Store load () and reload ()

Load (Object options) : Boolean
The configured Reader format is used to load the Record cache, and the specific request task is completed by the configured Proxy object.

Reload (Object options)
According to the last load operation parameters of the Reader format, again to the Proxy object to load (Reload) Record cache operation.

Load resubmits the new parameter request data
Reload submits requests for data with the last parameter

Load is used to refresh, otherwise the last parameter will be requested again

Related articles: