X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/2e847cf21b8ab9d15fa167b315ca5b2fa92638fc..b37ceabb82336ee82757cd32efe353cfab8ec267:/docs/output/Ext.data.JsonStore.html diff --git a/docs/output/Ext.data.JsonStore.html b/docs/output/Ext.data.JsonStore.html index b2124268..b0a12e2a 100644 --- a/docs/output/Ext.data.JsonStore.html +++ b/docs/output/Ext.data.JsonStore.html @@ -1,4 +1,4 @@ -
Observable Store JsonStore
Package: | Ext.data |
Defined In: | JsonStore.js |
Class: | JsonStore |
Extends: | Store |
Small helper class to make creating Ext.data.Stores from JSON data easier. +
Observable Store JsonStore
Package: | Ext.data |
Defined In: | JsonStore.js |
Class: | JsonStore |
Extends: | Store |
Small helper class to make creating Ext.data.Stores from JSON data easier. A JsonStore will be automatically configured with a Ext.data.JsonReader.
A store configuration would be something like:
var store = new Ext.data.JsonStore({
// store configs
@@ -184,7 +184,7 @@ To modify this property see Records stored in this Store. Read-only.
Method | Defined By | |
---|---|---|
JsonStore( Object config )
+ }); | Store | |
{Boolean} : Object isDestroyed
+True if the store has been destroyed already. Read only | Store |
Method | Defined By | |
---|---|---|
JsonStore( Object config )
Parameters:
| JsonStore | |
add( Ext.data.Record[] records )
:
voidAdd Records to the Store and fires the add event. To add Records
@@ -327,42 +328,62 @@ Ext.data.Record.COMMIT. Parameters:<
Returning false aborts and exits the iteration. scope : Object(optional) The scope ( this reference) in which the function is executed.
Defaults to the current Record in the iteration.
| Store | |
enableBubble( String/Array events )
:
- voidEnables events fired by this Observable to bubble up an owner hierarchy by calling
-this.getBubbleTarget() if present... Enables events fired by this Observable to bubble up an owner hierarchy by calling
- This is commonly used by Ext.Components to bubble events to owner Containers. See Ext.Component.getBubbleTarget. The default -implementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to -access the required target more quickly. -Example:
Parameters:
| Observable | |
filter( String field , String/RegExp value , [Boolean anyMatch ], [Boolean caseSensitive ] )
- :
- voidFilter the records by a specified property. Filter the records by a specified property. Parameters:
| Store | |
filterBy( Function fn , [Object scope ] )
+ voidEnables events fired by this Observable to bubble up an owner hierarchy by calling
+this.getBubbleTarget() if present.... Enables events fired by this Observable to bubble up an owner hierarchy by calling
+ This is commonly used by Ext.Components to bubble events to owner Containers. See Ext.Component.getBubbleTarget. The default +implementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to +access the required target more quickly. +Example:
Parameters:
| Observable | |
filter( String|Array field , String/RegExp value , [Boolean anyMatch ], [Boolean caseSensitive ], Boolean exactMatch )
+ :
+ voidFilter the records by a specified property. Alternatively, pass an array of filter
+options to filter by more than one... Filter the records by a specified property. Alternatively, pass an array of filter
+options to filter by more than one property.
+Single filter example:
+store.filter('name', 'Ed', true, true); //finds all records containing the substring 'Ed'
+Multiple filter example:
+
Parameters:
| Store | |
filterBy( Function fn , [Object scope ] )
:
voidFilter by a function. The specified function will be called for each
Record in this Store. If the function returns tr... Filter by a function. The specified function will be called for each
@@ -477,7 +498,13 @@ that Reader'
the existing cache.
Note: that Records in a Store are keyed by their id, so added Records
with ids which are already present in the Store will replace existing Records. Only Records with
-new, unique ids will be added. Returns:
| Store | |
on( String eventName , Function handler , [Object scope ], [Object options ] )
+new, unique ids will be added.Returns:
| Store | |
multiSort( Array sorters , String direction )
+ :
+ voidSorts the contents of this store by multiple field/direction sorters. This is called internally by sort
+and would not... Sorts the contents of this store by multiple field/direction sorters. This is called internally by sort
+and would not usually be called manually.
+Multi sorting only currently applies to local datasets - multiple sort data is not currently sent to a proxy
+if remoteSort is used. Parameters:
| Store | |
on( String eventName , Function handler , [Object scope ], [Object options ] )
:
voidAppends an event handler to this object (shorthand for addListener.) Appends an event handler to this object (shorthand for addListener.) Parameters:
| Observable | |
purgeListeners()
@@ -543,12 +570,34 @@ if there are no items to save or the save was cancelled.
:
void Set the value for a property name in this store's baseParams. Usage:myStore.setBaseParam('foo', {bar:3}); Set the value for a property name in this store's baseParams. Usage:
Parameters:
| Store | |
setDefaultSort( String fieldName , [String dir ] )
:
- voidSets the default sort column and order to be used by the next load operation. Sets the default sort column and order to be used by the next load operation. Parameters:
| Store | |
sort( String fieldName , [String dir ] )
+ voidSets the default sort column and order to be used by the next load operation. Sets the default sort column and order to be used by the next load operation. Parameters:
| Store | |
singleSort( String fieldName , [String dir ] )
+ :
+ voidSorts the store contents by a single field and direction. This is called internally by sort and would
+not usually be ... Sorts the store contents by a single field and direction. This is called internally by sort and would
+not usually be called manually Parameters:
| Store | |
sort( String/Array fieldName , [String dir ] )
:
voidSort the Records.
If remote sorting is used, the sort is performed on the server, and the cache is reloaded. If local... Sort the Records.
If remote sorting is used, the sort is performed on the server, and the cache is reloaded. If local
-sorting is used, the cache is sorted internally. See also remoteSort and paramNames. Parameters:
| Store | |
sum( String property , [Number start ], [Number end ] )
+sorting is used, the cache is sorted internally. See also remoteSort and paramNames.
+This function accepts two call signatures - pass in a field name as the first argument to sort on a single
+field, or pass in an array of sort configuration objects to sort by multiple fields.
+Single sort example:
+store.sort('name', 'ASC');
+Multi sort example:
+store.sort([
+{
+field : 'name',
+direction: 'ASC'
+},
+{
+field : 'salary',
+direction: 'DESC'
+}
+], 'ASC');
+In this second form, the sort configs are applied in order, with later sorters sorting within earlier sorters' results.
+For example, if two records with the same name are present they will also be sorted by salary if given the sort configs
+above. Any number of sort configs can be added.Parameters:
| Store | |
sum( String property , [Number start ], [Number end ] )
:
NumberSums the value of property for each record between start
and end and returns the result. Sums the value of property for each record between start
@@ -567,10 +616,10 @@ false the load action will b... Fires before a request is
( Ext.data.Store store , Object data )
Fires before a save action is called. A save encompasses destroying records, updating records and creating records. Fires before a save action is called. A save encompasses destroying records, updating records and creating records. Listeners will be called with the following arguments:
| Store | |
beforewrite :
- ( Ext.data.Store store , String action , Record/Array[Record] rs , Object options , Object arg )
- Listeners will be called with the following arguments:
| Store | |
clear :
- ( Store this , Record[] The )
- Fires when the data cache has been cleared. Fires when the data cache has been cleared. Listeners will be called with the following arguments:
| Store | |
datachanged :
+ ( Ext.data.Store store , String action , Record/Record[] rs , Object options , Object arg )
+ Listeners will be called with the following arguments:
| Store | |
clear :
+ ( Store this , Record[] records )
+ Fires when the data cache has been cleared. Fires when the data cache has been cleared. Listeners will be called with the following arguments:
| Store | |
datachanged :
( Store this )
Fires when the data cache has changed in a bulk manner (e.g., it has been sorted, filtered, etc.) and a
widget that i... Fires when the data cache has changed in a bulk manner (e.g., it has been sorted, filtered, etc.) and a
|