This article mainly introduces the differences between store. load and store. reload in ext. For more information, see
The Code is as follows:
Reload: function (options ){
This. load (Ext. applyIf (options | |{}, this. lastOptions ));
},
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.exe cute ('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. The specific request task is completed by the configured Proxy object.
Reload (Object options)
Based on the format specified by the Reader of the parameters of the previous load operation, the Reload Record cache operation is performed again on the Proxy object.
Load re-submit new parameter request data
Reload submit the data of the previous parameter request
To refresh, use load. Otherwise, the last parameter will be requested again.