X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..6b044c28b5f26fb99c86c237ffad19741c0f7f3d:/docs/output/Ext.data.ArrayStore.html diff --git a/docs/output/Ext.data.ArrayStore.html b/docs/output/Ext.data.ArrayStore.html index 00fc55e8..71fae102 100644 --- a/docs/output/Ext.data.ArrayStore.html +++ b/docs/output/Ext.data.ArrayStore.html @@ -1,4 +1,6 @@ -
Properties Methods Events Config Options Direct Link
Observable
  Store
    ArrayStore

Class Ext.data.ArrayStore

Package:Ext.data
Defined In:ArrayStore.js
Class:ArrayStore
Extends:Store
xtype:arraystore

Formerly known as "SimpleStore".

+
Observable
+  Store
+    ArrayStore

Class Ext.data.ArrayStore

Package:Ext.data
Defined In:ArrayStore.js
Class:ArrayStore
Extends:Store

Formerly known as "SimpleStore".

Small helper class to make creating Ext.data.Stores from Array data easier. An ArrayStore will be automatically configured with a Ext.data.ArrayReader.

A store configuration would be something like:

var store = new Ext.data.ArrayStore({
@@ -187,10 +189,12 @@ 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
A MixedCollection containing the defined Fields -for the Records stored in this Store. Read-only.
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 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 ...
Contains the last options object used as the parameter to the load method. See load for the details of what this may contain. This may be useful for accessing any params which were used -to load the current Record cache.
Store recordType : Function
The Record constructor as supplied to (or created by) the +to load the current Record cache.
Store multiSort : Boolean +True if this store is currently sorted by more than one field/direction combination.
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. @@ -198,67 +202,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

MethodDefined By

Public Methods

MethodDefined By
\ No newline at end of file +Success of the action is determined in the...
Fires if the server returns 200 after an Ext.data.Api.actions CRUD action. +Success of the action is determined in the 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).
Listeners will be called with the following arguments:
  • store : Ext.data.Store
  • action : String
    [Ext.data.Api.actions.create|update|destroy]
  • result : Object
    The 'data' picked-out out of the response for convenience.
  • res : Ext.Direct.Transaction
  • rs : Record/Record[]
    Store's records, the subject(s) of the write-action
Store \ No newline at end of file