X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..92c2b89db26be16707f4a805d3303ab2531006e1:/docs/output/Ext.data.XmlStore.html diff --git a/docs/output/Ext.data.XmlStore.html b/docs/output/Ext.data.XmlStore.html index aea7947d..2d9ae72b 100644 --- a/docs/output/Ext.data.XmlStore.html +++ b/docs/output/Ext.data.XmlStore.html @@ -1,4 +1,4 @@ -
Observable Store XmlStore
Package: | Ext.data |
Defined In: | XmlStore.js |
Class: | XmlStore |
Extends: | Store |
xtype: | xmlstore |
Small helper class to make creating Ext.data.Stores from XML data easier. +
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
@@ -202,134 +202,12 @@ events on the store are monitored in order to remotely StorePublic Properties
Property Defined By : ObjectList compiled by mystix on the extjs.com forums.
-Thank you Mystix! XmlStore Slovak : ObjectList compiled by mystix on the extjs.com forums.
-Thank you Mystix! XmlStore baseParams : ObjectSee the corresponding configuration option
+}); Store
Public Properties
Property Defined By baseParams : ObjectSee the corresponding configuration option
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 indicatorText : ObjectLatvian Translations
-By salix 17 April 2007 XmlStore indicatorText : ObjectGreek (Old Version) Translations by Vagelis
-03-June-2007 XmlStore indicatorText : ObjectVietnamese translation
-By bpmtri
-12-April-2007 04:06PM XmlStore indicatorText : ObjectList compiled by mystix on the extjs.com forums.
-Thank you Mystix!
-English Translations
-updated to 2.2 by Condor (8 A...List compiled by mystix on the extjs.com forums.
-Thank you Mystix!
-English Translations
-updated to 2.2 by Condor (8 Aug 2008) XmlStore indicatorText : ObjectSwedish translation (utf8-encoding)
-By Erik Andersson, Monator Technologies
-24 April 2007
-Changed by Cariad, 29 July ...Swedish translation (utf8-encoding)
-By Erik Andersson, Monator Technologies
-24 April 2007
-Changed by Cariad, 29 July 2007 XmlStore indicatorText : ObjectNorwegian translation (Bokmål: no-NB)
-By Tore Kjørsvik 21-January-2008 XmlStore indicatorText : ObjectNorwegian translation (Nynorsk: no-NN)
-By Tore Kjørsvik 21-January-2008 XmlStore indicatorText : ObjectGreek translation
-By thesilentman (utf8 encoding)
-27 Apr 2008
-Changes since previous (second) Version:
-+ added Date.s...Greek translation
-By thesilentman (utf8 encoding)
-27 Apr 2008
-Changes since previous (second) Version:
-+ added Date.shortMonthNames
-+ added Date.getShortMonthName
-+ added Date.monthNumbers
-+ added Ext.grid.GroupingView XmlStore indicatorText : ObjectPolish Translations
-By vbert 17-April-2007
-Updated by mmar 16-November-2007
-Encoding: utf-8 XmlStore indicatorText : ObjectPortuguese/Brazil Translation by Weber Souza
-08 April 2007
-Updated by Allan Brazute Alves (EthraZa)
-06 September 2007...Portuguese/Brazil Translation by Weber Souza
-08 April 2007
-Updated by Allan Brazute Alves (EthraZa)
-06 September 2007
-Updated by Leonardo Lima
-05 March 2008
-Updated by Juliano Tarini (jtarini)
-22 April 2008 XmlStore indicatorText : ObjectCzech Translations
-Translated by Tomáš KorÄák (72)
-2008/02/08 18:02, Ext-2.0.1 XmlStore indicatorText : ObjectLithuanian Translations (UTF-8)
-Vladas Saulis (vladas at prodata dot lt), 03-29-2009
-Vladas Saulis (vladas at prodat...Lithuanian Translations (UTF-8)
-Vladas Saulis (vladas at prodata dot lt), 03-29-2009
-Vladas Saulis (vladas at prodata dot lt), 10-18-2007 XmlStore indicatorText : ObjectPedoman translasi:
-http://id.wikisource.org/wiki/Panduan_Pembakuan_Istilah,_Pelaksanaan_Instruksi_Presiden_Nomor_2_Ta...Pedoman translasi:
-http://id.wikisource.org/wiki/Panduan_Pembakuan_Istilah,_Pelaksanaan_Instruksi_Presiden_Nomor_2_Tahun_2001_Tentang_Penggunaan_Komputer_Dengan_Aplikasi_Komputer_Berbahasa_Indonesia
-Original source: http://vlsm.org/etc/baku-0.txt
-by Farid GS
-farid [at] pulen.net
-10:13 04 Desember 2007
-Indonesian Translations XmlStore indicatorText : ObjectHebrew Translations
-By spartacus (from forums) 06-12-2007 XmlStore indicatorText : ObjectRomanian translations for ExtJS 2.1
-First released by Lucian Lature on 2007-04-24
-Changed locale for Romania (date fo...Romanian translations for ExtJS 2.1
-First released by Lucian Lature on 2007-04-24
-Changed locale for Romania (date formats) as suggested by keypoint
-on ExtJS forums: http://www.extjs.com/forum/showthread.php?p=129524#post129524
-Removed some useless parts
-Changed by: Emil Cazamir, 2008-04-24
-Fixed some errors left behind
-Changed by: Emil Cazamir, 2008-09-01 XmlStore indicatorText : ObjectSlovenian translation by Matjaž (UTF-8 encoding)
-25 April 2007 XmlStore indicatorText : ObjectFinnish Translations
-
-'ä' should read as lowercase 'a' with two dots on top (ä) XmlStore indicatorText : ObjectList compiled by mystix on the extjs.com forums.
-Thank you Mystix!
-Hungarian Translations (utf-8 encoded)
-by Amon (2...List compiled by mystix on the extjs.com forums.
-Thank you Mystix!
-Hungarian Translations (utf-8 encoded)
-by Amon (27 Apr 2008)
-encoding fixed by Vili (17 Feb 2009) XmlStore indicatorText : ObjectList compiled by mystix on the extjs.com forums.
-Thank you Mystix!
-English (UK) Translations
-updated to 2.2 by Condor...List compiled by mystix on the extjs.com forums.
-Thank you Mystix!
-English (UK) Translations
-updated to 2.2 by Condor (8 Aug 2008) XmlStore indicatorText : ObjectKorean Translations By nicetip
-05 September 2007
-Modify by techbug / 25 February 2008 XmlStore indicatorText : ObjectBulgarian Translation
-By ÐеоÑги ÐоÑÑадинов, ÐалгаÑи, Ðанада
-10 October 2007
-By Nedko Penev
-26 October 2007
-(utf-8 en...Bulgarian Translation
-By ÐеоÑги ÐоÑÑадинов, ÐалгаÑи, Ðанада
-10 October 2007
-By Nedko Penev
-26 October 2007
-(utf-8 encoding) XmlStore indicatorText : ObjectCatalonian Translation by halkon_polako 6-12-2007
-December correction halkon_polako 11-12-2007
-Synchronized with 2.2 ...Catalonian Translation by halkon_polako 6-12-2007
-December correction halkon_polako 11-12-2007
-Synchronized with 2.2 version of ext-lang-en.js (provided by Condor 8 aug 2008)
-by halkon_polako 14-aug-2008 XmlStore indicatorText : ObjectExt 2.2.0 - Portuguese/Portugal (pt_PT) Translation
-by Nuno Franco da Costa - francodacosta.com
-translated from ext-l...Ext 2.2.0 - Portuguese/Portugal (pt_PT) Translation
-by Nuno Franco da Costa - francodacosta.com
-translated from ext-lang-en.js
-11 Nov 2008 XmlStore indicatorText : ObjectList compiled by mystix on the extjs.com forums.
-Thank you Mystix!
-Turkish translation by Alper YAZGAN
-2008-01-24, 10...List compiled by mystix on the extjs.com forums.
-Thank you Mystix!
-Turkish translation by Alper YAZGAN
-2008-01-24, 10:29 AM
-Updated to 2.2 by YargicX
-2008-10-05, 06:22 PM XmlStore indicatorText : ObjectList compiled by KillerNay on the extjs.com forums.
-Thank you KillerNay!
-Thailand Translations XmlStore indicatorText : ObjectList compiled by mystix on the extjs.com forums.
-Thank you Mystix!
-Dutch Translations
-by Ido Sebastiaan Bas van Oostv...List compiled by mystix on the extjs.com forums.
-Thank you Mystix!
-Dutch Translations
-by Ido Sebastiaan Bas van Oostveen (12 Oct 2007)
-updated to 2.2 by Condor (8 Aug 2008) XmlStore lastOptions : ObjectContains the last options object used as the parameter to the load method. See load
+for the Records stored in this Store. Read-only. Store lastOptions : ObjectContains the last options object used as the parameter to the load method. See load
for the details of what this may ... Store recordType : FunctionThe Record constructor as supplied to (or created by) the
@@ -340,67 +218,69 @@ If the Reader was constructed by passing...The Ext.data.Record.create for additional details).
This property may be used to create new Records of the type held in this Store, for example:
// create the data store
-var store = new Ext.data.ArrayStore({
- autoDestroy: true,
- fields: [
- {name: 'company'},
- {name: 'price', type: 'float'},
- {name: 'change', type: 'float'},
- {name: 'pctChange', type: 'float'},
- {name: 'lastChange', type: 'date', dateFormat: 'n/j h:ia'}
- ]
-});
-store.loadData(myData);
+ var store = new Ext.data.ArrayStore({
+ autoDestroy: true,
+ fields: [
+ {name: 'company'},
+ {name: 'price', type: 'float'},
+ {name: 'change', type: 'float'},
+ {name: 'pctChange', type: 'float'},
+ {name: 'lastChange', type: 'date', dateFormat: 'n/j h:ia'}
+ ]
+ });
+ store.loadData(myData);
-// create the Grid
-var grid = new Ext.grid.EditorGridPanel({
- store: store,
- colModel: new Ext.grid.ColumnModel({
- columns: [
- {id:'company', header: 'Company', width: 160, dataIndex: 'company'},
- {header: 'Price', renderer: 'usMoney', dataIndex: 'price'},
- {header: 'Change', renderer: change, dataIndex: 'change'},
- {header: '% Change', renderer: pctChange, dataIndex: 'pctChange'},
- {header: 'Last Updated', width: 85,
- renderer: Ext.util.Format.dateRenderer('m/d/Y'),
- dataIndex: 'lastChange'}
- ],
- defaults: {
- sortable: true,
- width: 75
- }
- }),
- autoExpandColumn: 'company', // match the id specified in the column model
- height:350,
- width:600,
- title:'Array Grid',
- tbar: [{
- text: 'Add Record',
- handler : function(){
- var defaultData = {
- change: 0,
- company: 'New Company',
- lastChange: (new Date()).clearTime(),
- pctChange: 0,
- price: 10
- };
- var recId = 3; // provide unique id
- var p = new store.recordType(defaultData, recId); // create new record
- grid.stopEditing();
- store.insert(0, p); // insert a new record into the store (also see add)
- grid.startEditing(0, 0);
- }
- }]
-});
Store
Public Methods
Method Defined By XmlStore( Object config
)
- Parameters:config
: Object
Returns:- void
xtype: xmlstore
XmlStore add( Ext.data.Record[] records
)
+ // create the Grid
+ var grid = new Ext.grid.EditorGridPanel({
+ store: store,
+ colModel: new Ext.grid.ColumnModel({
+ columns: [
+ {id:'company', header: 'Company', width: 160, dataIndex: 'company'},
+ {header: 'Price', renderer: 'usMoney', dataIndex: 'price'},
+ {header: 'Change', renderer: change, dataIndex: 'change'},
+ {header: '% Change', renderer: pctChange, dataIndex: 'pctChange'},
+ {header: 'Last Updated', width: 85,
+ renderer: Ext.util.Format.dateRenderer('m/d/Y'),
+ dataIndex: 'lastChange'}
+ ],
+ defaults: {
+ sortable: true,
+ width: 75
+ }
+ }),
+ autoExpandColumn: 'company', // match the id specified in the column model
+ height:350,
+ width:600,
+ title:'Array Grid',
+ tbar: [{
+ text: 'Add Record',
+ handler : function(){
+ var defaultData = {
+ change: 0,
+ company: 'New Company',
+ lastChange: (new Date()).clearTime(),
+ pctChange: 0,
+ price: 10
+ };
+ var recId = 3; // provide unique id
+ var p = new store.recordType(defaultData, recId); // create new record
+ grid.stopEditing();
+ store.insert(0, p); // insert a new record into the store (also see add)
+ grid.startEditing(0, 0);
+ }
+ }]
+ }); Store
Public Methods
Method Defined By XmlStore( Object config
)
+ Parameters:config
: Object
Returns:- void
XmlStore add( Ext.data.Record[] records
)
:
voidAdd Records to the Store and fires the add event. To add Records
to the store from a remote source use load({add:tru...Add Records to the Store and fires the add event. To add Records
to the store from a remote source use load({add:true})
.
See also recordType
and insert
.Parameters:records
: Ext.data.Record[]An Array of Ext.data.Record objects
-to add to the cache. See recordType.
Returns:- void
Store addEvents( Object object
)
+to add to the cache. See recordType.Returns:- void
Store addEvents( Object|String o
, string Optional.
)
:
- voidUsed to define events on this ObservableUsed to define events on this ObservableParameters:object
: ObjectThe object with the events defined
Returns:- void
Observable addListener( String eventName
, Function handler
, [Object scope
], [Object options
] )
+ voidAdds the specified events to the list of events which this Observable may fire.Adds the specified events to the list of events which this Observable may fire.Parameters:o
: Object|StringEither an object with event names as properties with a value of true
+or the first event name string if multiple event names are being passed as separate parameters.Optional.
: stringEvent name if multiple event names are being passed as separate parameters.
+Usage:this.addEvents('storeloaded', 'storecleared');
Returns:- void
Observable addListener( String eventName
, Function handler
, [Object scope
], [Object options
] )
:
voidAppends an event handler to this object.Appends an event handler to this object.Parameters:eventName
: StringThe name of the event to listen for.handler
: FunctionThe method the event invokes.scope
: Object(optional) The scope (this
reference) in which the handler function is executed.
If omitted, defaults to the object which fired the event.options
: Object(optional) An object containing handler configuration.
@@ -421,8 +301,8 @@ Using the options argument, it is possible to combine different types of listene
A delayed, one-time listener.
myDataView.on('click', this.onClick, this, {
- single: true,
- delay: 100
+single: true,
+delay: 100
});
Attaching multiple handlers in 1 call
@@ -430,27 +310,27 @@ The method also allows for a single argument to be passed which is a config obje
which specify multiple handlers.
myGridPanel.on({
- 'click' : {
- fn: this.onClick,
- scope: this,
- delay: 100
- },
- 'mouseover' : {
- fn: this.onMouseOver,
- scope: this
- },
- 'mouseout' : {
- fn: this.onMouseOut,
- scope: this
- }
+'click' : {
+ fn: this.onClick,
+ scope: this,
+ delay: 100
+},
+'mouseover' : {
+ fn: this.onMouseOver,
+ scope: this
+},
+'mouseout' : {
+ fn: this.onMouseOut,
+ scope: this
+}
});
Or a shorthand syntax:
myGridPanel.on({
- 'click' : this.onClick,
- 'mouseover' : this.onMouseOver,
- 'mouseout' : this.onMouseOut,
- scope: this
+'click' : this.onClick,
+'mouseover' : this.onMouseOver,
+'mouseout' : this.onMouseOut,
+ scope: this
});
Returns:- void
Observable addSorted( Ext.data.Record record
)
:
void(Local sort only) Inserts the passed Record into the Store at the index where it
@@ -470,9 +350,42 @@ Ext.data.Record.COMMIT.Parameters:<
voidDestroys the store.Destroys the store.Parameters:- None.
Returns:- void
Store each( Function fn
, [Object scope
] )
:
voidCalls the specified function for each of the Records in the cache.Calls the specified function for each of the Records in the cache. Store enableBubble( Object events
)
- :
- voidUsed to enable bubbling of eventsUsed to enable bubbling of eventsParameters:events
: Object
Returns:- void
Observable filter( String field
, String/RegExp value
, [Boolean anyMatch
], [Boolean caseSensitive
] )
+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. Returns:- void
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.getBubbleTarget()
if present. There is no implementation in the Observable base class.
+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:
Ext.override(Ext.form.Field, {
+ // Add functionality to Field's initComponent to enable the change event to bubble
+ initComponent : Ext.form.Field.prototype.initComponent.createSequence(function() {
+ this.enableBubble('change');
+ }),
+
+ // We know that we want Field's events to bubble directly to the FormPanel.
+ getBubbleTarget : function() {
+ if (!this.formPanel) {
+ this.formPanel = this.findParentByType('form');
+ }
+ return this.formPanel;
+ }
+});
+
+var myForm = new Ext.formPanel({
+ title: 'User Details',
+ items: [{
+ ...
+ }],
+ listeners: {
+ change: function() {
+ // Title goes red if form has been modified.
+ myForm.header.setStyle('color', 'red');
+ }
+ }
+});
Parameters:events
: String/ArrayThe event name to bubble, or an Array of event names.
Returns:- void
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:field
: StringA field on your recordsvalue
: String/RegExpEither a string that the field should begin with, or a RegExp to test
against the field.anyMatch
: Boolean(optional) true to match any part not just the beginningcaseSensitive
: Boolean(optional) true for case sensitive comparison
Returns:- void
Store filterBy( Function fn
, [Object scope
] )
@@ -484,10 +397,10 @@ otherwise it is filtered out.Parameters:record : Ext.data.RecordThe record
to test for filtering. Access field values using Ext.data.Record.get.
id : ObjectThe ID of the Record passed.
-scope
: Object(optional) The scope of the function (defaults to this) Returns:- void
Store find( String property
, String/RegExp value
, [Number startIndex
], [Boolean anyMatch
], [Boolean caseSensitive
] )
+scope
: Object(optional) The scope (this
reference) in which the function is executed. Defaults to this Store. Returns:- void
Store find( String fieldName
, String/RegExp value
, [Number startIndex
], [Boolean anyMatch
], [Boolean caseSensitive
] )
:
- NumberFinds the index of the first matching record in this store by a specific property/value.Finds the index of the first matching record in this store by a specific property/value.Parameters:property
: StringA property on your objectsvalue
: String/RegExpEither a string that the property value
-should begin with, or a RegExp to test against the property.startIndex
: Number(optional) The index to start searching atanyMatch
: Boolean(optional) True to match any part of the string, not just the beginningcaseSensitive
: Boolean(optional) True for case sensitive comparison
Returns:Number
The matched index or -1
Store findBy( Function fn
, [Object scope
], [Number startIndex
] )
+ NumberFinds the index of the first matching Record in this store by a specific field value.Finds the index of the first matching Record in this store by a specific field value.Parameters:fieldName
: StringThe name of the Record field to test.value
: String/RegExpEither a string that the field value
+should begin with, or a RegExp to test against the field.startIndex
: Number(optional) The index to start searching atanyMatch
: Boolean(optional) True to match any part of the string, not just the beginningcaseSensitive
: Boolean(optional) True for case sensitive comparison
Returns:Number
The matched index or -1
Store findBy( Function fn
, [Object scope
], [Number startIndex
] )
:
NumberFind the index of the first matching Record in this Store by a function.
If the function returns true it is considere...Find the index of the first matching Record in this Store by a function.
@@ -495,9 +408,9 @@ If the function returns true it is considered a match.The record
to test for filtering. Access field values using Ext.data.Record.get.
id : ObjectThe ID of the Record passed.
-scope
: Object(optional) The scope of the function (defaults to this)startIndex
: Number(optional) The index to start searching at Returns:Number
The matched index or -1
Store findExact( String property
, String/RegExp value
, [Number startIndex
] )
+scope
: Object(optional) The scope (this
reference) in which the function is executed. Defaults to this Store.startIndex
: Number(optional) The index to start searching at Returns:Number
The matched index or -1
Store findExact( String fieldName
, Mixed value
, [Number startIndex
] )
:
- NumberFinds the index of the first matching record in this store by a specific property/value.Finds the index of the first matching record in this store by a specific property/value.Parameters:property
: StringA property on your objectsvalue
: String/RegExpThe value to match againststartIndex
: Number(optional) The index to start searching at
Returns:Number
The matched index or -1
Store fireEvent( String eventName
, Object... args
)
+ NumberFinds the index of the first matching Record in this store by a specific field value.Finds the index of the first matching Record in this store by a specific field value.Parameters:fieldName
: StringThe name of the Record field to test.value
: MixedThe value to match the field against.startIndex
: Number(optional) The index to start searching at
Returns:Number
The matched index or -1
Store fireEvent( String eventName
, Object... args
)
:
BooleanFires the specified event with the passed parameters (minus the event name).
An event may be set to bubble up an Obse...Fires the specified event with the passed parameters (minus the event name).
@@ -570,14 +483,14 @@ will be automatically included with the posted parameters according to the speci
parameters to a remote data source. Note: params
will override any
baseParams
of the same name.
Parameters are encoded as standard HTTP parameters using Ext.urlEncode.
-callback : FunctionA function to be called after the Records
-have been loaded. The callback is called after the load event and is passed the following arguments:
-- r : Ext.data.Record[]
-- options: Options object from the load call
-- success: Boolean success indicator
-scope : ObjectScope with which to call the callback (defaults
+
callback : FunctionA function to be called after the Records
+have been loaded. The callback is called after the load event is fired, and is passed the following arguments:
+- r : Ext.data.Record[] An Array of Records loaded.
+- options : Options object from the load call.
+- success : Boolean success indicator.
+scope : ObjectScope with which to call the callback (defaults
to the Store object)
-add : BooleanIndicator to append loaded records rather than
+
add : BooleanIndicator to append loaded records rather than
replace the current cache. Note: see note for loadData
Returns:Boolean
If the <i>developer</i> provided <tt>{@link #beforeload}</tt> event handler returns
<tt>false</tt>, the load call will abort and will return <tt>false</tt>; otherwise will return <tt>true</tt>.
Store loadData( Object data
, [Boolean append
] )
@@ -607,22 +520,30 @@ included in the results.Parameters:
record : Ext.data.RecordThe record
to test for filtering. Access field values using Ext.data.Record.get.
id : ObjectThe ID of the Record passed.
-scope
: Object(optional) The scope of the function (defaults to this) Returns:MixedCollection
Returns an Ext.util.MixedCollection of the matched records
Store rejectChanges()
+scope
: Object(optional) The scope (this
reference) in which the function is executed. Defaults to this Store. Returns:MixedCollection
Returns an Ext.util.MixedCollection of the matched records
Store rejectChanges()
:
voidReject outstanding changes on all modified records. Store relayEvents( Object o
, Array events
)
:
- voidRelays selected events from the specified Observable as if the events were fired by this.Relays selected events from the specified Observable as if the events were fired by this.Parameters:o
: ObjectThe Observable whose events this object is to relay.events
: ArrayArray of event names to relay.
Returns:- void
Observable reload( [Object options
] )
- :
- voidReloads the Record cache from the configured Proxy using the configured Reader and
-the options from the last load ope...Reloads the Record cache from the configured Proxy using the configured Reader and
-the options from the last load operation performed.
-Note: see the Important note in load.
Parameters:options
: Object(optional) An Object containing loading options which may
-override the options used in the last load operation. See load for details (defaults to
-null, in which case the lastOptions are used).
Returns:- void
Store remove( Ext.data.Record record
)
+ voidRelays selected events from the specified Observable as if the events were fired by this.Relays selected events from the specified Observable as if the events were fired by this.Parameters:o
: ObjectThe Observable whose events this object is to relay.events
: ArrayArray of event names to relay.
Returns:- void
Observable reload( Object options
)
+ :
+ voidReloads the Record cache from the configured Proxy using the configured
+Reader and the options from the last load ope...Reloads the Record cache from the configured Proxy using the configured
+Reader and the options from the last load operation
+performed.
+Note: see the Important note in load.
Parameters:options
: Object(optional) An Object containing
+loading options which may override the options
+used in the last load operation. See load for details
+(defaults to null, in which case the lastOptions are
+used).
+
To add new params to the existing params:
lastOptions = myStore.lastOptions;
+Ext.apply(lastOptions.params, {
+ myNewParam: true
+});
+myStore.reload(lastOptions);
Returns:- void
Store remove( Ext.data.Record/Ext.data.Record[] record
)
:
- voidRemove a Record from the Store and fires the remove event.Remove a Record from the Store and fires the remove event.Parameters:record
: Ext.data.RecordThe Ext.data.Record object to remove from the cache.
Returns:- void
Store removeAll()
+ voidRemove Records from the Store and fires the remove event.Remove Records from the Store and fires the remove event.Parameters:record
: Ext.data.Record/Ext.data.Record[]The record object or array of records to remove from the cache.
Returns:- void
Store removeAll( Boolean silent
)
:
- voidRemove all Records from the Store and fires the clear event.Remove all Records from the Store and fires the clear event.Parameters:- None.
Returns:- void
Store removeAt( Number index
)
+ voidRemove all Records from the Store and fires the clear event.Remove all Records from the Store and fires the clear event.Parameters:silent
: Boolean[false] Defaults to false. Set true to not fire clear event.
Returns:- void
Store removeAt( Number index
)
:
voidRemove a Record from the Store at the specified index. Fires the remove event.Remove a Record from the Store at the specified index. Fires the remove event.Parameters:index
: NumberThe index of the record to remove.
Returns:- void
Store removeListener( String eventName
, Function handler
, [Object scope
] )
:
@@ -634,7 +555,7 @@ event...Resume firing events. (see Parameters:- None.
Returns:- void
Observable save()
:
- voidSaves all pending changes to the store. If the commensurate Ext.data.Api.actions action is not configured, then
+ NumberSaves all pending changes to the store. If the commensurate Ext.data.Api.actions action is not configured, then
the ...Saves all pending changes to the store. If the commensurate Ext.data.Api.actions action is not configured, then
the configured url
will be used.
@@ -643,7 +564,8 @@ change url
removed records Ext.data.Api.actions.destroy
phantom records Ext.data.Api.actions.create
modified records Ext.data.Api.actions.update
-
Parameters:- None.
Returns:- void
Store setBaseParam( String name
, Mixed value
)
+Parameters:- None.
Returns:Number
batch Returns a number to uniquely identify the "batch" of saves occurring. -1 will be returned
+if there are no items to save or the save was cancelled.
Store setBaseParam( String name
, Mixed value
)
:
voidSet 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:myStore.setBaseParam('foo', {bar:3});
Parameters:name
: StringName of the property to assignvalue
: MixedValue to assign the named property
Returns:- void
Store setDefaultSort( String fieldName
, [String dir
] )
:
@@ -667,11 +589,14 @@ after the Fires before a request is made for a new data object. If the beforeload handler returns
false the load action will b... Store beforewrite :
- ( DataProxy this
, String action
, Record/Array[Record] rs
, Object options
, Object arg
)
- Listeners will be called with the following arguments:this
: DataProxyaction
: String[Ext.data.Api.actions.create|update|destroy]rs
: Record/Array[Record]options
: ObjectThe loading options that were specified. Edit options.params
to add Http parameters to the request. (see save for details)arg
: ObjectThe callback's arg object passed to the request function
Store clear :
- ( Store this
)
- Fires when the data cache has been cleared.Fires when the data cache has been cleared.Listeners will be called with the following arguments:this
: Store
Store datachanged :
+false the load action will be canceled.Listeners will be called with the following arguments:this
: Storeoptions
: ObjectThe loading options that were specified (see load for details)
Store beforesave :
+ ( 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
: Ext.data.Storedata
: ObjectAn object containing the data that is to be saved. The object will contain a key for each appropriate action,
+with an array of records for each action.
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
: Ext.data.Storeaction
: String[Ext.data.Api.actions.create|update|destroy]rs
: Record/Array[Record]options
: ObjectThe loading options that were specified. Edit options.params
to add Http parameters to the request. (see save for details)arg
: ObjectThe callback's arg object passed to the request function
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:this
: StoreThe
: Record[]records that were cleared.
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
@@ -697,15 +622,17 @@ for description. Store this, Object meta
)
Fires when this store's reader provides new metadata (fields). This is currently only supported for JsonReaders.Fires when this store's reader provides new metadata (fields). This is currently only supported for JsonReaders.Listeners will be called with the following arguments:this
: Storemeta
: ObjectThe JSON metadata
Store remove :
( Store this
, Ext.data.Record record
, Number index
)
- Fires when a Record has been removed from the StoreFires when a Record has been removed from the StoreListeners will be called with the following arguments:this
: Storerecord
: Ext.data.RecordThe Record that was removedindex
: NumberThe index at which the record was removed
Store update :
+ Fires when a Record has been removed from the StoreFires when a Record has been removed from the StoreListeners will be called with the following arguments:this
: Storerecord
: Ext.data.RecordThe Record that was removedindex
: NumberThe index at which the record was removed
Store save :
+ ( Ext.data.Store store
, Number batch
, Object data
)
+ Fires after a save is completed. A save encompasses destroying records, updating records and creating records.Fires after a save is completed. A save encompasses destroying records, updating records and creating records.Listeners will be called with the following arguments:store
: Ext.data.Storebatch
: NumberThe identifier for the batch that was saved.data
: ObjectAn object containing the data that is to be saved. The object will contain a key for each appropriate action,
+with an array of records for each action.
Store update :
( Store this
, Ext.data.Record record
, String operation
)
Fires when a Record has been updatedFires when a Record has been updatedListeners will be called with the following arguments:this
: Storerecord
: Ext.data.RecordThe Record that was updatedoperation
: StringThe update operation being performed. Value may be one of:
Ext.data.Record.EDIT
- Ext.data.Record.REJECT
- Ext.data.Record.COMMIT
Store write :
+ Ext.data.Record.REJECT
+ Ext.data.Record.COMMIT Store write :
( Ext.data.Store store
, String action
, Object result
, Ext.Direct.Transaction res
, Record/Record[] rs
)
Fires if the server returns 200 after an Ext.data.Api.actions CRUD action.
-Success or failure of the action is availa...Fires if the server returns 200 after an Ext.data.Api.actions CRUD action.
-Success or failure of the action is available in the result['successProperty']
property.
-The server-code might set the successProperty
to false if a database validation
-failed, for example.Listeners will be called with the following arguments:store
: Ext.data.Storeaction
: String[Ext.data.Api.actions.create|update|destroy]result
: ObjectThe 'data' picked-out out of the response for convenience.res
: Ext.Direct.Transactionrs
: Record/Record[]Store's records, the subject(s) of the write-action
Store
result['successProperty']
property (NOTE for RESTful stores,
+a simple 20x response is sufficient for the actions "destroy" and "update". The "create" action should should return 200 along with a database pk).store
: Ext.data.Storeaction
: Stringresult
: Objectres
: Ext.Direct.Transactionrs
: Record/Record[]