Class type Ext_data_Store.configs


class type configs = object .. end
Inherits
method autoDestroy : bool Js.t Js.prop

When a Store is used by only one DataView, and should only exist for the lifetime of that view, then configure the autoDestroy flag as true. This causes the destruction of the view to trigger the destruction of its Store.

Defaults to: false

method buffered : bool Js.t Js.prop

Allows the Store to prefetch and cache in a page cache, pages of Records, and to then satisfy loading requirements from this page cache.

To use buffered Stores, initiate the process by loading the first page. The number of rows rendered are determined automatically, and the range of pages needed to keep the cache primed for scrolling is requested and cached. Example:

myStore.loadPage(1); // Load page 1

A BufferedRenderer is instantiated which will monitor the scrolling in the grid, and refresh the view's rows from the page cache as needed. It will also pull new data into the page cache when scrolling of the view draws upon data near either end of the prefetched data.

The margins which trigger view refreshing from the prefetched data are Ext.grid.plugin.BufferedRenderer.numFromEdge, Ext.grid.plugin.BufferedRenderer.leadingBufferZone and Ext.grid.plugin.BufferedRenderer.trailingBufferZone.

The margins which trigger loading more data into the page cache are, leadingBufferZone and trailingBufferZone.

By default, only 5 pages of data are cached in the page cache, with pages "scrolling" out of the buffer as the view moves down through the dataset. Setting this value to zero means that no pages are ever scrolled out of the page cache, and that eventually the whole dataset may become present in the page cache. This is sometimes desirable as long as datasets do not reach astronomical proportions.

Selection state may be maintained across page boundaries by configuring the SelectionModel not to discard records from its collection when those Records cycle out of the Store's primary collection. This is done by configuring the SelectionModel like this:

selModel: {
    pruneRemoved: false
}

Defaults to: false

method clearOnPageLoad : bool Js.t Js.prop

True to empty the store when loading another page via loadPage, nextPage or previousPage. Setting to false keeps existing records, allowing large data sets to be loaded one page at a time but rendered all together.

Defaults to: true

method clearRemovedOnLoad : bool Js.t Js.prop

true to clear anything in the removed record collection when the store loads.

Defaults to: true

method data : 'a. 'a Js.t Js.prop

Array of Model instances or data objects to load locally. See "Inline data" above for details.


method groupDir : Js.js_string Js.t Js.prop

The direction in which sorting should be applied when grouping. Supported values are "ASC" and "DESC".

Defaults to: "ASC"

method groupField : Js.js_string Js.t Js.prop

The field by which to group data in the store. Internally, grouping is very similar to sorting - the groupField and groupDir are injected as the first sorter (see sort). Stores support a single level of grouping, and groups can be fetched via the getGroups method.


method groupers : Ext_util_MixedCollection.t Js.t Js.prop

The collection of Groupers currently applied to this Store.


method leadingBufferZone : Js.number Js.t Js.prop

When buffered, the number of extra rows to keep cached on the leading side of scrolling buffer as scrolling proceeds. A larger number means fewer replenishments from the server.

Defaults to: 200

method pageSize : Js.number Js.t Js.prop

The number of records considered to form a 'page'. This is used to power the built-in paging using the nextPage and previousPage functions when the grid is paged using a PagingToolbar Defaults to 25.

If this Store is buffered, pages are loaded into a page cache before the Store's data is updated from the cache. The pageSize is the number of rows loaded into the cache in one request. This will not affect the rendering of a buffered grid, but a larger page size will mean fewer loads.

In a buffered grid, scrolling is monitored, and the page cache is kept primed with data ahead of the direction of scroll to provide rapid access to data when scrolling causes it to be required. Several pages in advance may be requested depending on various parameters.

It is recommended to tune the pageSize, trailingBufferZone and leadingBufferZone configurations based upon the conditions pertaining in your deployed application.

The provided SDK example examples/grid/infinite-scroll-grid-tuner.html can be used to experiment with different settings including simulating Ajax latency.


method proxy : 'b. 'b Js.t Js.prop

The Proxy to use for this Store. This can be either a string, a config object or a Proxy instance - see setProxy for details.


method purgePageCount : Js.number Js.t Js.prop

Valid only when used with a buffered Store.

The number of pages additional to the required buffered range to keep in the prefetch cache before purging least recently used records.

For example, if the height of the view area and the configured trailingBufferZone and leadingBufferZone require that there are three pages in the cache, then a purgePageCount of 5 ensures that up to 8 pages can be in the page cache any any one time.

A value of 0 indicates to never purge the prefetched data.

Defaults to: 5

method remoteFilter : bool Js.t Js.prop

true if the grouping should be performed on the server side, false if it is local only.

Buffered stores automatically set this to true. Buffered stores contain an abitrary subset of the full dataset which depends upon various configurations and which pages have been requested for rendering. Such sparse datasets are ineligible for local filtering.

Defaults to: false

method remoteGroup : bool Js.t Js.prop

true if the grouping should apply on the server side, false if it is local only. If the grouping is local, it can be applied immediately to the data. If it is remote, then it will simply act as a helper, automatically sending the grouping information to the server.

Buffered stores automatically set this to true. Buffered stores contain an abitrary subset of the full dataset which depends upon various configurations and which pages have been requested for rendering. Such sparse datasets are ineligible for local grouping.

Defaults to: false

method remoteSort : bool Js.t Js.prop

true if the sorting should be performed on the server side, false if it is local only.

Buffered stores automatically set this to true. Buffered stores contain an abitrary subset of the full dataset which depends upon various configurations and which pages have been requested for rendering. Such sparse datasets are ineligible for local sorting.

Defaults to: false

method sortOnFilter : bool Js.t Js.prop

For local filtering only, causes sort to be called whenever filter is called, causing the sorters to be reapplied after filtering.

Defaults to: true

method trailingBufferZone : Js.number Js.t Js.prop

When buffered, the number of extra records to keep cached on the trailing side of scrolling buffer as scrolling proceeds. A larger number means fewer replenishments from the server.

Defaults to: 25