Current location - Quotes Website - Signature design - EXTJS callback function
EXTJS callback function
Signature function (storethis, ext. Data.record [] record of loading event callback in API, object option).

The Load event is started after the data is loaded, such as autoLoad: true, and calling the load method, the laodData method and the add method will not trigger.

This: Store, a reference to the store itself that triggered the event. If the scope is not defined when defining the event, this parameter is equivalent to this pointer in the function. Using this as a parameter name here is easy to confuse. Function parameters have nothing to do with pointers inside the function. You should avoid using it as a parameter name. Generally, when defining callbacks, such functions (_store, _records, _ops), plus _ to mark internal variables, are easily confused with the scope of JavaScript variables, so the naming specification is very important.

Records: external data records []

Loaded record

In most cases, it is equivalent to all the data in the storage. In a special case, when the second parameter append is specified as true by calling the loadData method, the original data is preserved and only the data added by the load is recorded.

Options: objects

Specified loading options (see Loading for details)

The reference to the parameter object provided when calling the load method. That is, if the load event is triggered by calling the load method, the options parameter is the parameter used to call the load method. For example, paging usually has a parameter: store. load ({params: {start: 0,limit:50 } }); Options = {params: {start: 0,limit: 50}}

There is a docs directory in the Ext package ~ It is a complete Api-Doc, which can be read when deployed in local IE (it can't be used when opened directly from the file system) ~

My personal suggestion is that it's better to look at the original version of the downloaded Ext package ~ the third-party Chinese version ~ I've seen some ~ There are many mistakes and omissions in the translated content, either negligence or the reason why the translator doesn't understand ExtJs== ~ What's more, there are many machine-translated versions ~ which are completely incomprehensible. Even holding a dictionary is more helpful than looking up those Chinese versions.