X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/2e847cf21b8ab9d15fa167b315ca5b2fa92638fc..530ef4b6c5b943cfa68b779d11cf7de29aa878bf:/docs/output/Ext.data.XmlStore.html?ds=inline diff --git a/docs/output/Ext.data.XmlStore.html b/docs/output/Ext.data.XmlStore.html index 2d9ae72b..1e78abe8 100644 --- a/docs/output/Ext.data.XmlStore.html +++ b/docs/output/Ext.data.XmlStore.html @@ -1,49 +1,49 @@ -
Observable Store XmlStore
Package: | Ext.data |
Defined In: | XmlStore.js |
Class: | XmlStore |
Extends: | Store |
Small helper class to make creating Ext.data.Stores from XML data easier. -A XmlStore will be automatically configured with a Ext.data.XmlReader.
-A store configuration would be something like:
var store = new Ext.data.XmlStore({
- // store configs
- autoDestroy: true,
- storeId: 'myStore',
- url: 'sheldon.xml', // automatically configures a HttpProxy
- // reader configs
- record: 'Item', // records will have an "Item" tag
- idPath: 'ASIN',
- totalRecords: '@TotalResults'
- fields: [
- // set up the fields mapping into the xml doc
- // The first needs mapping, the others are very basic
- {name: 'Author', mapping: 'ItemAttributes > Author'},
- 'Title', 'Manufacturer', 'ProductGroup'
- ]
-});
-This store is configured to consume a returned object of the form:
<?xml version="1.0" encoding="UTF-8"?>
-<ItemSearchResponse xmlns="http://webservices.amazon.com/AWSECommerceService/2009-05-15">
- <Items>
- <Request>
- <IsValid>True</IsValid>
- <ItemSearchRequest>
- <Author>Sidney Sheldon</Author>
- <SearchIndex>Books</SearchIndex>
- </ItemSearchRequest>
- </Request>
- <TotalResults>203</TotalResults>
- <TotalPages>21</TotalPages>
- <Item>
- <ASIN>0446355453</ASIN>
- <DetailPageURL>
- http://www.amazon.com/
- </DetailPageURL>
- <ItemAttributes>
- <Author>Sidney Sheldon</Author>
- <Manufacturer>Warner Books</Manufacturer>
- <ProductGroup>Book</ProductGroup>
- <Title>Master of the Game</Title>
- </ItemAttributes>
- </Item>
- </Items>
-</ItemSearchResponse>
-An object literal of this form could also be used as the data config option.
-Note: Although not listed here, this class accepts all of the configuration options of +
Observable Store XmlStore
Package: | Ext.data |
Defined In: | XmlStore.js |
Class: | XmlStore |
Extends: | Store |
Small helper class to make creating Ext.data.Stores from XML data easier. +A XmlStore will be automatically configured with a Ext.data.XmlReader.
+A store configuration would be something like:
var store = new Ext.data.XmlStore({
+ // store configs
+ autoDestroy: true,
+ storeId: 'myStore',
+ url: 'sheldon.xml', // automatically configures a HttpProxy
+ // reader configs
+ record: 'Item', // records will have an "Item" tag
+ idPath: 'ASIN',
+ totalRecords: '@TotalResults'
+ fields: [
+ // set up the fields mapping into the xml doc
+ // The first needs mapping, the others are very basic
+ {name: 'Author', mapping: 'ItemAttributes > Author'},
+ 'Title', 'Manufacturer', 'ProductGroup'
+ ]
+});
+This store is configured to consume a returned object of the form:
<?xml version="1.0" encoding="UTF-8"?>
+<ItemSearchResponse xmlns="http://webservices.amazon.com/AWSECommerceService/2009-05-15">
+ <Items>
+ <Request>
+ <IsValid>True</IsValid>
+ <ItemSearchRequest>
+ <Author>Sidney Sheldon</Author>
+ <SearchIndex>Books</SearchIndex>
+ </ItemSearchRequest>
+ </Request>
+ <TotalResults>203</TotalResults>
+ <TotalPages>21</TotalPages>
+ <Item>
+ <ASIN>0446355453</ASIN>
+ <DetailPageURL>
+ http://www.amazon.com/
+ </DetailPageURL>
+ <ItemAttributes>
+ <Author>Sidney Sheldon</Author>
+ <Manufacturer>Warner Books</Manufacturer>
+ <ProductGroup>Book</ProductGroup>
+ <Title>Master of the Game</Title>
+ </ItemAttributes>
+ </Item>
+ </Items>
+</ItemSearchResponse>
+An object literal of this form could also be used as the data config option.
+Note: Although not listed here, this class accepts all of the configuration options of XmlReader.
Config Options | Defined By | |
---|---|---|
autoDestroy : Boolean true to destroy the store when the component the store is bound
to is destroyed (defaults to false).
Note: this shoul... true to destroy the store when the component the store is bound
@@ -207,10 +207,13 @@ for a description of this property.
To modify this property see setBasePar... See the corresponding configuration option
for a description of this property.
To modify this property see setBaseParam . | Store | |
fields : Ext.util.MixedCollection | Store | |
lastOptions : Object Contains the last options object used as the parameter to the load method. See load
+for the Records stored in this Store. Read-only. | Store | |
hasMultiSort : Boolean +True if this store is currently sorted by more than one field/direction combination. | Store | |
isDestroyed : Boolean +True if the store has been destroyed already. Read only | Store | |
lastOptions : Object Contains the last options object used as the parameter to the load method. See load
for the details of what this may ... | Store | |
recordType : Function The Record constructor as supplied to (or created by) the
+to load the current Record cache. | Store | |
multiSortInfo : Object +Object containing overall sort direction and an ordered array of sorter configs used when sorting on multiple fields | Store | |
recordType : Function The Record constructor as supplied to (or created by) the
Reader. Read-only.
If the Reader was constructed by passing... The Record constructor as supplied to (or created by) the
Reader. Read-only.
@@ -353,42 +356,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
@@ -503,7 +526,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()
@@ -569,12 +598,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
@@ -593,8 +644,8 @@ 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 :
+ ( 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[] 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 :
( Store this )
|