Home > Web Front-end > JS Tutorial > Example introduction to the difference between store.load and store.reload in ext_extjs

Example introduction to the difference between store.load and store.reload in ext_extjs

WBOY
Release: 2016-05-16 16:44:09
Original
1739 people have browsed it
Copy code The code is as follows:

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

Copy code The code is as follows:

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
Use the configured Reader format to load the Record cache. The specific requested task is by The configured Proxy object is completed.

reload(Object options)
According to the format specified by the Reader of the parameters of the last load operation, once again request the Proxy object to perform the operation of loading (Reload) the Record cache.

load resubmits the new parameter request data
reload submits the last parameter request data

Use load to refresh, otherwise the last parameter will be requested again
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template