X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/2e847cf21b8ab9d15fa167b315ca5b2fa92638fc..refs/heads/old:/docs/output/Ext.data.Store.html?ds=inline diff --git a/docs/output/Ext.data.Store.html b/docs/output/Ext.data.Store.html index 70d96c71..c2a4cd02 100644 --- a/docs/output/Ext.data.Store.html +++ b/docs/output/Ext.data.Store.html @@ -1,4 +1,5 @@ -
Observable Store
Package: | Ext.data |
Defined In: | Store.js |
Class: | Store |
Subclasses: | ArrayStore, DirectStore, GroupingStore, JsonStore, XmlStore |
Extends: | Observable |
The Store class encapsulates a client side cache of Record +
Observable + Store
Package: | Ext.data |
Defined In: | Store.js |
Class: | Store |
Subclasses: | ArrayStore, DirectStore, GroupingStore, JsonStore, XmlStore |
Extends: | Observable |
The Store class encapsulates a client side cache of Record objects which provide input data for Components such as the GridPanel, the ComboBox, or the DataView.
Retrieving Data
@@ -218,10 +219,12 @@ for a description of this property. To modify this property see setBasePar...corresponding configuration option
for a description of this property.
To modify this property see setBaseParam
.scope
: Objectthis
reference) in which the function is executed.
Defaults to the current Record in the iteration.String/Array events
)
:
- voidEnables 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');
- }
- }
-});
events
: String/ArrayString field
, String/RegExp value
, [Boolean anyMatch
], [Boolean caseSensitive
] )
- :
- voidfield
: Stringvalue
: String/RegExpanyMatch
: BooleancaseSensitive
: BooleanFunction fn
, [Object scope
] )
+ voidEnables 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');
+ }
+ }
+});
events
: String/ArrayString|Array field
, String/RegExp value
, [Boolean anyMatch
], [Boolean caseSensitive
], Boolean exactMatch
)
+ :
+ voidstore.filter([
+{
+property : 'name',
+value : 'Ed',
+anyMatch : true, //optional, defaults to true
+caseSensitive: true //optional, defaults to true
+},
+//filter functions can also be passed
+{
+fn : function(record) {
+return record.get('age') == 24
+},
+scope: this
+}
+]);
field
: String|Arrayvalue
: String/RegExpanyMatch
: BooleancaseSensitive
: BooleanexactMatch
: BooleanFunction fn
, [Object scope
] )
:
voidString eventName
, Function handler
, [Object scope
], [Object options
] )
+new, unique ids will be added.Returns:Array sorters
, String direction
)
+ :
+ voidsorters
: Arraydirection
: StringString eventName
, Function handler
, [Object scope
], [Object options
] )
:
voideventName
: Stringhandler
: Functionscope
: Objectthis
reference) in which the handler function is executed.
If omitted, defaults to the object which fired the event.options
: ObjectmyStore.setBaseParam('foo', {bar:3});
name
: Stringvalue
: MixedString fieldName
, [String dir
] )
:
- voidfieldName
: Stringdir
: StringString fieldName
, [String dir
] )
+ voidfieldName
: Stringdir
: StringString fieldName
, [String dir
] )
+ :
+ voidfieldName
: Stringdir
: StringString/Array fieldName
, [String dir
] )
:
voidfieldName
: Stringdir
: StringString 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.fieldName
: String/Arraydir
: StringString property
, [Number start
], [Number end
] )
:
NumberExt.data.Store store
, Object data
)
store
: Ext.data.Storedata
: ObjectExt.data.Store store
, String action
, Record/Array[Record] rs
, Object options
, Object arg
)
- store
: Ext.data.Storeaction
: Stringrs
: Record/Array[Record]options
: Objectoptions.params
to add Http parameters to the request. (see save for details)arg
: ObjectStore this
, Record[] The
)
- this
: StoreThe
: Record[]Ext.data.Store store
, String action
, Record/Record[] rs
, Object options
, Object arg
)
+ store
: Ext.data.Storeaction
: Stringrs
: Record/Record[]options
: Objectoptions.params
to add Http parameters to the request. (see save for details)arg
: ObjectStore this
, Record[] records
)
+ this
: Storerecords
: Record[]Store this
)