X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/2e847cf21b8ab9d15fa167b315ca5b2fa92638fc..6b044c28b5f26fb99c86c237ffad19741c0f7f3d:/docs/output/Ext.data.JsonStore.html?ds=inline diff --git a/docs/output/Ext.data.JsonStore.html b/docs/output/Ext.data.JsonStore.html index b2124268..0e096c5c 100644 --- a/docs/output/Ext.data.JsonStore.html +++ b/docs/output/Ext.data.JsonStore.html @@ -1,4 +1,6 @@ -
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
@@ -181,10 +183,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
)