Ext.data.Store

Hierarchy

Ext.Base
Ext.Evented
Ext.data.Store

Inherited mixins

Requires

Subclasses

Files

The Store class encapsulates a client side cache of Model objects. Stores load data via a Proxy, and also provide functions for sorting, filtering and querying the model instances contained within it.

Creating a Store is easy - we just tell it the Model and the Proxy to use to load and save its data:

// Set up a model to use in our Store
Ext.define("User", {
    extend: "Ext.data.Model",
    config: {
        fields: [
            {name: "firstName", type: "string"},
            {name: "lastName",  type: "string"},
            {name: "age",       type: "int"},
            {name: "eyeColor",  type: "string"}
        ]
    }
});

var myStore = Ext.create("Ext.data.Store", {
    model: "User",
    proxy: {
        type: "ajax",
        url : "/users.json",
        reader: {
            type: "json",
            rootProperty: "users"
        }
    },
    autoLoad: true
});

Ext.create("Ext.List", {
    fullscreen: true,
    store: myStore,
    itemTpl: "{lastName}, {firstName} ({age})"
});

In the example above we configured an AJAX proxy to load data from the url '/users.json'. We told our Proxy to use a JsonReader to parse the response from the server into Model object - see the docs on JsonReader for details.

The external data file, /users.json, is as follows:

{
    "success": true,
    "users": [
        {
            "firstName": "Tommy",
            "lastName": "Maintz",
            "age": 24,
            "eyeColor": "green"
        },
        {
            "firstName": "Aaron",
            "lastName": "Conran",
            "age": 26,
            "eyeColor": "blue"
        },
        {
            "firstName": "Jamie",
            "lastName": "Avins",
            "age": 37,
            "eyeColor": "brown"
        }
    ]
}

Inline data

Stores can also load data inline. Internally, Store converts each of the objects we pass in as data into Model instances:

// Set up a model to use in our Store
Ext.define('User', {
    extend: 'Ext.data.Model',
    config: {
        fields: [
            {name: 'firstName', type: 'string'},
            {name: 'lastName',  type: 'string'},
            {name: 'age',       type: 'int'},
            {name: 'eyeColor',  type: 'string'}
        ]
    }
});

Ext.create("Ext.data.Store", {
    storeId: "usersStore",
    model: "User",
    data : [
        {firstName: "Ed",    lastName: "Spencer"},
        {firstName: "Tommy", lastName: "Maintz"},
        {firstName: "Aaron", lastName: "Conran"},
        {firstName: "Jamie", lastName: "Avins"}
    ]
});

Ext.create("Ext.List", {
    fullscreen: true,
    store: "usersStore",
    itemTpl: "{lastName}, {firstName}"
});

Loading inline data using the method above is great if the data is in the correct format already (e.g. it doesn't need to be processed by a reader). If your inline data requires processing to decode the data structure, use a MemoryProxy instead (see the MemoryProxy docs for an example).

Additional data can also be loaded locally using add.

Loading Nested Data

Applications often need to load sets of associated data - for example a CRM system might load a User and her Orders. Instead of issuing an AJAX request for the User and a series of additional AJAX requests for each Order, we can load a nested dataset and allow the Reader to automatically populate the associated models. Below is a brief example, see the Ext.data.reader.Reader intro documentation for a full explanation:

// Set up a model to use in our Store
Ext.define('User', {
    extend: 'Ext.data.Model',
    config: {
        fields: [
            {name: 'name', type: 'string'},
            {name: 'id',   type: 'int'}
        ]
    }
});

var store = Ext.create('Ext.data.Store', {
    autoLoad: true,
    model: "User",
    proxy: {
        type: 'ajax',
        url : 'users.json',
        reader: {
            type: 'json',
            rootProperty: 'users'
        }
    }
});

Ext.create("Ext.List", {
    fullscreen: true,
    store: store,
    itemTpl: "{name} (id: {id})"
});

Which would consume a response like this:

{
    "users": [
        {
            "id": 1,
            "name": "Ed",
            "orders": [
                {
                    "id": 10,
                    "total": 10.76,
                    "status": "invoiced"
                },
                {
                    "id": 11,
                    "total": 13.45,
                    "status": "shipped"
                }
            ]
        },
        {
            "id": 3,
            "name": "Tommy",
            "orders": [
            ]
        },
        {
            "id": 4,
            "name": "Jamie",
            "orders": [
                {
                    "id": 12,
                    "total": 17.76,
                    "status": "shipped"
                }
            ]
        }
    ]
}

See the Ext.data.reader.Reader intro docs for a full explanation.

Filtering and Sorting

Stores can be sorted and filtered - in both cases either remotely or locally. The sorters and filters are held inside MixedCollection instances to make them easy to manage. Usually it is sufficient to either just specify sorters and filters in the Store configuration or call sort or filter:

// Set up a model to use in our Store
Ext.define('User', {
    extend: 'Ext.data.Model',
    config: {
        fields: [
            {name: 'firstName', type: 'string'},
            {name: 'lastName', type: 'string'},
            {name: 'age',   type: 'int'}
        ]
    }
});

var store = Ext.create("Ext.data.Store", {
    autoLoad: true,
    model: "User",
    proxy: {
        type: "ajax",
        url : "users.json",
        reader: {
            type: "json",
            rootProperty: "users"
        }
    },
    sorters: [
        {
            property : "age",
            direction: "DESC"
        },
        {
            property : "firstName",
            direction: "ASC"
        }
    ],
    filters: [
        {
            property: "firstName",
            value: /Jamie/
        }
    ]
});

Ext.create("Ext.List", {
    fullscreen: true,
    store: store,
    itemTpl: "{lastName}, {firstName} ({age})"
});

And the data file, users.json, is as follows:

{
    "success": true,
    "users": [
        {
            "firstName": "Tommy",
            "lastName": "Maintz",
            "age": 24
        },
        {
            "firstName": "Aaron",
            "lastName": "Conran",
            "age": 26
        },
        {
            "firstName": "Jamie",
            "lastName": "Avins",
            "age": 37
        }
    ]
}

The new Store will keep the configured sorters and filters in the MixedCollection instances mentioned above. By default, sorting and filtering are both performed locally by the Store - see remoteSort and remoteFilter to allow the server to perform these operations instead.

Filtering and sorting after the Store has been instantiated is also easy. Calling filter adds another filter to the Store and automatically filters the dataset (calling filter with no arguments simply re-applies all existing filters). Note that by default your sorters are automatically reapplied if using local sorting.

store.filter('eyeColor', 'Brown');

Change the sorting at any time by calling sort:

store.sort('height', 'ASC');

Note that all existing sorters will be removed in favor of the new sorter data (if sort is called with no arguments, the existing sorters are just reapplied instead of being removed). To keep existing sorters and add new ones, just add them to the MixedCollection:

store.sorters.add(new Ext.util.Sorter({
    property : 'shoeSize',
    direction: 'ASC'
}));

store.sort();

Registering with StoreManager

Any Store that is instantiated with a storeId will automatically be registered with the StoreManager. This makes it easy to reuse the same store in multiple views:

// this store can be used several times
Ext.create('Ext.data.Store', {
    model: 'User',
    storeId: 'usersStore'
});

Ext.create('Ext.List', {
    store: 'usersStore'
    // other config goes here
});

Ext.create('Ext.view.View', {
    store: 'usersStore'
    // other config goes here
});

Further Reading

Stores are backed up by an ecosystem of classes that enables their operation. To gain a full understanding of these pieces and how they fit together, see:

  • Proxy - overview of what Proxies are and how they are used
  • Model - the core class in the data package
  • Reader - used by any subclass of ServerProxy to read a response
Defined By

Config options

Ext.data.Store
view source
: Booleanprivate
This is a private configuration used in the framework whether this Store can be destroyed. ...

This is a private configuration used in the framework whether this Store can be destroyed.

Defaults to: false

If data is not specified, and if autoLoad is true or an Object, this store's load method is automatically called afte...

If data is not specified, and if autoLoad is true or an Object, this store's load method is automatically called after creation. If the value of autoLoad is an Object, this Object will be passed to the store's load() method.

Defaults to: false

true to automatically sync the Store with its Proxy after every edit to one of its Records. ...

true to automatically sync the Store with its Proxy after every edit to one of its Records.

Defaults to: false

The event name to bubble, or an Array of event names.

The event name to bubble, or an Array of event names.

Allows the Store to prefetch and cache in a page cache, pages of Records, and to then satisfy loading requirements fr...

Allows the Store to prefetch and cache in a page cache, pages of Records, and to then satisfy loading requirements from this page cache.

To use buffered Stores, initiate the process by loading the first page. The number of rows rendered are determined automatically, and the range of pages needed to keep the cache primed for scrolling is requested and cached. Example:

myStore.loadPage(1); // Load page 1

A BufferedRenderer is instantiated which will monitor the scrolling in the grid, and refresh the view's rows from the page cache as needed. It will also pull new data into the page cache when scrolling of the view draws upon data near either end of the prefetched data.

The margins which trigger view refreshing from the prefetched data are Ext.grid.plugin.BufferedRenderer.numFromEdge, Ext.grid.plugin.BufferedRenderer.leadingBufferZone and Ext.grid.plugin.BufferedRenderer.trailingBufferZone.

The margins which trigger loading more data into the page cache are, leadingBufferZone and trailingBufferZone.

By default, only 5 pages of data are cached in the page cache, with pages "scrolling" out of the buffer as the view moves down through the dataset. Setting this value to zero means that no pages are ever scrolled out of the page cache, and that eventually the whole dataset may become present in the page cache. This is sometimes desirable as long as datasets do not reach astronomical proportions.

Selection state may be maintained across page boundaries by configuring the SelectionModel not to discard records from its collection when those Records cycle out of the Store's primary collection. This is done by configuring the SelectionModel like this:

selModel: {
    pruneRemoved: false
}

Defaults to: false

true to empty the store when loading another page via loadPage, nextPage or previousPage. ...

true to empty the store when loading another page via loadPage, nextPage or previousPage. Setting to false keeps existing records, allowing large data sets to be loaded one page at a time but rendered all together.

Defaults to: true

Array of Model instances or data objects to load locally. ...

Array of Model instances or data objects to load locally. See "Inline data" above for details.

This configuration allows you to prevent destroying record instances when they are removed from this store and are no...

This configuration allows you to prevent destroying record instances when they are removed from this store and are not in any other store.

Defaults to: true

Returns Ext.util.Collection not just an Object. ...

Returns Ext.util.Collection not just an Object. Use in place of specifying a model configuration. The fields should be a set of Ext.data.Field configuration objects. The store will automatically create a Ext.data.Model with these fields. In general this configuration option should be avoided, it exists for the purposes of backwards compatibility. For anything more complicated, such as specifying a particular id property or associations, a Ext.data.Model should be defined and specified for the model config.

Returns

Ext.data.Store
view source
: Object[]
Array of Filters for this store. ...

Array of Filters for this store. This configuration is handled by the Filterable mixin of the data collection.

Ext.data.Store
view source
: Functiondeprecated
This function will be passed to the grouper configuration as it's groupFn. ...

This function will be passed to the grouper configuration as it's groupFn. Note that this configuration is deprecated and grouper: {groupFn: yourFunction}} is preferred.

This cfg has been deprecated

Ext.data.Store
view source
: String
The direction in which sorting should be applied when grouping. ...

The direction in which sorting should be applied when grouping. If you specify a grouper by using the groupField configuration, this will automatically default to "ASC" - the other supported value is "DESC"

The (optional) field by which to group data in the store. ...

The (optional) field by which to group data in the store. Internally, grouping is very similar to sorting - the groupField and groupDir are injected as the first sorter (see sort). Stores support a single level of grouping, and groups can be fetched via the getGroups method.

Ext.data.Store
view source
: Object
A configuration object for this Store's grouper. ...

A configuration object for this Store's grouper.

For example, to group a store's items by the first letter of the last name:

Ext.define('People', {
    extend: 'Ext.data.Store',

    config: {
        fields: ['first_name', 'last_name'],

        grouper: {
            groupFn: function(record) {
                return record.get('last_name').substr(0, 1);
            },
            sortProperty: 'last_name'
        }
    }
});
A config object containing one or more event handlers to be added to this object during initialization. ...

A config object containing one or more event handlers to be added to this object during initialization. This should be a valid listeners config object as specified in the addListener example for attaching multiple handlers at once.

See the Event guide for more

Note: It is bad practice to specify a listener's config when you are defining a class using Ext.define(). Instead, only specify listeners when you are instantiating your class with Ext.create().

Ext.data.Store
view source
: String
Returns Ext.data.Model and not a String. ...

Returns Ext.data.Model and not a String. Name of the Model associated with this store. The string is used as an argument for Ext.ModelManager.getModel.

Ext.data.Store
view source
: Objectprivate
...

Defaults to: {}

Ext.data.Store
view source
: Number
The number of records considered to form a 'page'. ...

The number of records considered to form a 'page'. This is used to power the built-in paging using the nextPage and previousPage functions.

If this Store is buffered, pages are loaded into a page cache before the Store's data is updated from the cache. The pageSize is the number of rows loaded into the cache in one request. This will not affect the rendering of a buffered grid, but a larger page size will mean fewer loads.

In a buffered grid, scrolling is monitored, and the page cache is kept primed with data ahead of the direction of scroll to provide rapid access to data when scrolling causes it to be required. Several pages in advance may be requested depending on various parameters.

It is recommended to tune the pageSize, trailingBufferZone and leadingBufferZone configurations based upon the conditions pertaining in your deployed application.

Defaults to: 25

Ext.data.Store
view source
: Object
Parameters to send into the proxy for any CRUD operations ...

Parameters to send into the proxy for any CRUD operations

Defaults to: {}

An object or array of objects that will provide custom functionality for this component. ...

An object or array of objects that will provide custom functionality for this component. The only requirement for a valid plugin is that it contain an init method that accepts a reference of type Ext.Component.

When a component is created, if any plugins are available, the component will call the init method on each plugin, passing a reference to itself. Each plugin can then call methods or respond to events on the component as needed to provide its functionality.

For examples of plugins, see Ext.plugin.PullRefresh and Ext.plugin.ListPaging

Example code

A plugin by alias:

Ext.create('Ext.dataview.List', {
    config: {
        plugins: 'listpaging',
        itemTpl: '<div class="item">{title}</div>',
        store: 'Items'
    }
});

Multiple plugins by alias:

Ext.create('Ext.dataview.List', {
    config: {
        plugins: ['listpaging', 'pullrefresh'],
        itemTpl: '<div class="item">{title}</div>',
        store: 'Items'
    }
});

Single plugin by class name with config options:

Ext.create('Ext.dataview.List', {
    config: {
        plugins: {
            xclass: 'Ext.plugin.ListPaging', // Reference plugin by class
            autoPaging: true
        },

        itemTpl: '<div class="item">{title}</div>',
        store: 'Items'
    }
});

Multiple plugins by class name with config options:

Ext.create('Ext.dataview.List', {
    config: {
        plugins: [
            {
                xclass: 'Ext.plugin.PullRefresh',
                pullRefreshText: 'Pull to refresh...'
            },
            {
                xclass: 'Ext.plugin.ListPaging',
                autoPaging: true
            }
        ],

        itemTpl: '<div class="item">{title}</div>',
        store: 'Items'
    }
});
The Proxy to use for this Store. ...

The Proxy to use for this Store. This can be either a string, a config object or a Proxy instance - see setProxy for details.

true to defer any filtering operation to the server. ...

true to defer any filtering operation to the server. If false, filtering is done locally on the client.

If this is set to true, you will have to manually call the load method after you filter to retrieve the filtered data from the server.

Buffered stores automatically set this to true. Buffered stores contain an abitrary subset of the full dataset which depends upon various configurations and which pages have been requested for rendering. Such sparse datasets are ineligible for local filtering.

Defaults to: false

true to defer any grouping operation to the server. ...

true to defer any grouping operation to the server. If false, grouping is done locally on the client.

Buffered stores automatically set this to true. Buffered stores contain an abitrary subset of the full dataset which depends upon various configurations and which pages have been requested for rendering. Such sparse datasets are ineligible for local grouping.

Defaults to: false

true to defer any sorting operation to the server. ...

true to defer any sorting operation to the server. If false, sorting is done locally on the client.

If this is set to true, you will have to manually call the load method after you sort, to retrieve the sorted data from the server.

Buffered stores automatically set this to true. Buffered stores contain an abitrary subset of the full dataset which depends upon various configurations and which pages have been requested for rendering. Such sparse datasets are ineligible for local sorting.

Defaults to: false

Ext.data.Store
view source
: Object[]
Array of Sorters for this store. ...

Array of Sorters for this store. This configuration is handled by the Sortable mixin of the data collection. See also the sort method.

Ext.data.Store
view source
: String
Unique identifier for this store. ...

Unique identifier for this store. If present, this Store will be registered with the Ext.data.StoreManager, making it easy to reuse elsewhere.

This configuration allows you to disable the synchronization of removed records on this Store. ...

This configuration allows you to disable the synchronization of removed records on this Store. By default, when you call removeAll() or remove(), records will be added to an internal removed array. When you then sync the Store, we send a destroy request for these records. If you don't want this to happen, you can set this configuration to false.

Defaults to: true

The total number of records in the full dataset, as indicated by a server. ...

The total number of records in the full dataset, as indicated by a server. If the server-side dataset contains 5000 records but only returns pages of 50 at a time, totalCount will be set to 5000 and getCount will return 50

Properties

Defined By

Instance properties

The page that the Store has most recently loaded (see loadPage) ...

The page that the Store has most recently loaded (see loadPage)

Defaults to: 1

...

Defaults to: /\.|[^\w\-]/g

...

Defaults to: false

Ext.data.Store
view source
: Booleanprivate
...

Defaults to: true

...

Defaults to: /^(?:delegate|single|delay|buffer|args|prepend)$/

...

Defaults to: {id: 'observable', hooks: {destroy: 'destroy'}}

Overrides: Ext.mixin.Sortable.mixinConfig

...

Defaults to: 'identifiable'

...

Defaults to: 'observable'

Get the reference to the current class from which this object was instantiated. ...

Get the reference to the current class from which this object was instantiated. Unlike statics, this.self is scope-dependent and it's meant to be used for dynamic inheritance. See statics for a detailed comparison

Ext.define('My.Cat', {
    statics: {
        speciesName: 'Cat' // My.Cat.speciesName = 'Cat'
    },

    constructor: function() {
        alert(this.self.speciesName); // dependent on 'this'
    },

    clone: function() {
        return new this.self();
    }
});


Ext.define('My.SnowLeopard', {
    extend: 'My.Cat',
    statics: {
        speciesName: 'Snow Leopard'         // My.SnowLeopard.speciesName = 'Snow Leopard'
    }
});

var cat = new My.Cat();                     // alerts 'Cat'
var snowLeopard = new My.SnowLeopard();     // alerts 'Snow Leopard'

var clone = snowLeopard.clone();
alert(Ext.getClassName(clone));             // alerts 'My.SnowLeopard'
...

Defaults to: /^([\w\-]+)$/

Defined By

Static properties

...

Defaults to: []

Methods

Defined By

Instance methods

Ext.data.Store
view source
new( config ) : Ext.data.Store
...

Parameters

Returns

Fires

    Overrides: Ext.Evented.constructor

    Ext.data.Store
    view source
    ( model ) : Ext.data.Model[]
    Adds Model instance to the Store. ...

    Adds Model instance to the Store. This method accepts either:

    • An array of Model instances or Model configuration objects.
    • Any number of Model instance or Model configuration object arguments.

    The new Model instances will be added at the end of the existing collection.

    Sample usage:

    myStore.add({some: 'data2'}, {some: 'other data2'});
    

    Use addData method instead if you have raw data that need to pass through the data reader.

    Parameters

    • model : Ext.data.Model[]/Ext.data.Model...

      An array of Model instances or Model configuration objects, or variable number of Model instance or config arguments.

    Returns

    Fires

    ( eventName, fn, [scope], [options] )
    Appends an after-event handler. ...

    Appends an after-event handler.

    Same as addListener with order set to 'after'.

    Parameters

    • eventName : String/String[]/Object

      The name of the event to listen for.

    • fn : Function/String

      The method the event invokes.

    • scope : Object (optional)

      The scope for fn.

    • options : Object (optional)

      An object containing handler configuration.

    Fires

      ( eventName, fn, [scope], [options] )
      Appends a before-event handler. ...

      Appends a before-event handler. Returning false from the handler will stop the event.

      Same as addListener with order set to 'before'.

      Parameters

      • eventName : String/String[]/Object

        The name of the event to listen for.

      • fn : Function/String

        The method the event invokes.

      • scope : Object (optional)

        The scope for fn.

      • options : Object (optional)

        An object containing handler configuration.

      Fires

        Ext.data.Store
        view source
        ( data )
        Uses the configured reader to convert the data into records and adds it to the Store. ...

        Uses the configured reader to convert the data into records and adds it to the Store. Use this when you have raw data that needs to pass trough converters, mappings and other extra logic from the reader.

        If your data is already formated and ready for consumption, use add method.

        Parameters

        • data : Object[]

          Array of data to load

        Fires

        ( selector, name, fn, scope, options, order )private
        ...

        Parameters

        Fires

          Adds 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.

          This method has been deprecated since 2.0

          It's no longer needed to add events before firing.

          Parameters

          • eventNames : Object/String...

            Either 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.

          ( eventName, [fn], [scope], [options], [order] )
          Appends an event handler to this object. ...

          Appends an event handler to this object. You can review the available handlers by looking at the 'events' section of the documentation for the component you are working with.

          Combining Options

          Using the options argument, it is possible to combine different types of listeners:

          A delayed, one-time listener:

          container.addListener('tap', this.handleTap, this, {
              single: true,
              delay: 100
          });
          

          Attaching multiple handlers in 1 call

          The method also allows for a single argument to be passed which is a config object containing properties which specify multiple events. For example:

          container.addListener({
              tap  : this.onTap,
              swipe: this.onSwipe,
          
              scope: this // Important. Ensure "this" is correct during handler execution
          });
          

          One can also specify options for each event handler separately:

          container.addListener({
              tap  : { fn: this.onTap, scope: this, single: true },
              swipe: { fn: button.onSwipe, scope: button }
          });
          

          See the Events Guide for more.

          Parameters

          • eventName : String/String[]/Object

            The name of the event to listen for. May also be an object who's property names are event names.

          • fn : Function/String (optional)

            The method the event invokes. Will be called with arguments given to fireEvent plus the options parameter described below.

          • 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.

            This object may contain any of the following properties:

            • scope : Object (optional)

              The scope (this reference) in which the handler function is executed. If omitted, defaults to the object which fired the event.

            • delay : Number (optional)

              The number of milliseconds to delay the invocation of the handler after the event fires.

            • single : Boolean (optional)

              true to add a handler to handle just the next firing of the event, and then remove itself.

            • order : String (optional)

              The order of when the listener should be added into the listener queue.

              If you set an order of before and the event you are listening to is preventable, you can return false and it will stop the event.

              Available options are before, current and after.

              Defaults to: current

            • buffer : Number (optional)

              Causes the handler to be delayed by the specified number of milliseconds. If the event fires again within that time, the original handler is not invoked, but the new handler is scheduled in its place.

            • element : String (optional)

              Allows you to add a listener onto a element of this component using the elements reference.

              Ext.create('Ext.Component', {
                  listeners: {
                      element: 'element',
                      tap: function() {
                          alert('element tap!');
                      }
                  }
              });
              

              All components have the element reference, which is the outer most element of the component. Ext.Container also has the innerElement element which contains all children. In most cases element is adequate.

            • delegate : String (optional)

              Uses Ext.ComponentQuery to delegate events to a specified query selector within this item.

              // Create a container with a two children; a button and a toolbar
              var container = Ext.create('Ext.Container', {
                  items: [
                      {
                          xtype: 'toolbar',
                          docked: 'top',
                          title: 'My Toolbar'
                      },
                      {
                         xtype: 'button',
                         text: 'My Button'
                      }
                  ]
              });
              
              container.addListener({
                  // Ext.Buttons have an xtype of 'button', so we use that are a selector for our delegate
                  delegate: 'button',
              
                  tap: function() {
                      alert('Button tapped!');
                  }
              });
              
          • order : String (optional)

            The order of when the listener should be added into the listener queue. Possible values are before, current and after.

            Defaults to: 'current'

          Fires

            ( object, eventName, [fn], [scope], [options] )deprecated
            Adds listeners to any Observable object (or Element) which are automatically removed when this Component is destroyed. ...

            Adds listeners to any Observable object (or Element) which are automatically removed when this Component is destroyed.

            This method has been deprecated since 2.0

            All listeners are now automatically managed where necessary. Simply use addListener.

            Parameters

            • object : Ext.mixin.Observable/HTMLElement

              The item to which to add a listener/listeners.

            • eventName : Object/String

              The event name, or an object containing event name properties.

            • fn : Function (optional)

              If the eventName parameter was an event name, this is the handler function.

            • scope : Object (optional)

              If the eventName parameter was an event name, this is the scope in which the handler function is executed.

            • options : Object (optional)

              If the eventName parameter was an event name, this is the addListener options.

            Ext.data.Store
            view source
            ( record, modifiedFieldNames, modified )private
            A model instance should call this method on the Store it has been joined to. ...

            A model instance should call this method on the Store it has been joined to.

            Parameters

            Fires

            Ext.data.Store
            view source
            ( record, modifiedFieldNames, modified )private
            A model instance should call this method on the Store it has been joined to. ...

            A model instance should call this method on the Store it has been joined to.

            Parameters

            • record : Ext.data.Model

              The model instance that was edited.

            • modifiedFieldNames : String[]

              Array of field names changed during edit.

            • modified : Object

            Fires

            Ext.data.Store
            view source
            ( record )private
            This gets called by a record after is gets erased from the server. ...

            This gets called by a record after is gets erased from the server.

            Parameters

            Fires

            Ext.data.Store
            view source
            ( record )private
            A model instance should call this method on the Store it has been joined to. ...

            A model instance should call this method on the Store it has been joined to.

            Parameters

            Fires

            ...

            Parameters

            Fires

              Ext.data.Store
              view source
              ( data )
              We are using applyData so that we can return nothing and prevent the this.data property to be overridden. ...

              We are using applyData so that we can return nothing and prevent the this.data property to be overridden.

              Parameters

              Fires

              Ext.data.Store
              view source
              ( getGroupStringFn )private
              ...

              Parameters

              Fires

                Ext.data.Store
                view source
                ( grouper )private
                ...

                Parameters

                ...

                Parameters

                Fires

                  Ext.data.Store
                  view source
                  ( model )private
                  ...

                  Parameters

                  Fires

                    Ext.data.Store
                    view source
                    ( config )private
                    ...

                    Parameters

                    Ext.data.Store
                    view source
                    ( proxy, currentProxy )private
                    ...

                    Parameters

                    Fires

                      Ext.data.Store
                      view source
                      ( value )private
                      ...

                      Parameters

                      Fires

                        Ext.data.Store
                        view source
                        ( value )private
                        ...

                        Parameters

                        Fires

                          Ext.data.Store
                          view source
                          ( value )private
                          ...

                          Parameters

                          Fires

                            Ext.data.Store
                            view source
                            ( storeId )private
                            ...

                            Parameters

                            Fires

                              Ext.data.Store
                              view source
                              ( field ) : Number
                              Gets the average value in the store. ...

                              Gets the average value in the store.

                              Parameters

                              • field : String

                                The field in each record you want to get the average for.

                              Returns

                              • Number

                                The average value, if no items exist, 0.

                              Call the original method that was previously overridden with override, This method is deprecated as callParent does ...

                              Call the original method that was previously overridden with override,

                              This method is deprecated as callParent does the same thing.

                              Ext.define('My.Cat', {
                                  constructor: function() {
                                      alert("I'm a cat!");
                                  }
                              });
                              
                              My.Cat.override({
                                  constructor: function() {
                                      alert("I'm going to be a cat!");
                              
                                      var instance = this.callOverridden();
                              
                                      alert("Meeeeoooowwww");
                              
                                      return instance;
                                  }
                              });
                              
                              var kitty = new My.Cat(); // alerts "I'm going to be a cat!"
                                                        // alerts "I'm a cat!"
                                                        // alerts "Meeeeoooowwww"
                              

                              Parameters

                              • args : Array/Arguments

                                The arguments, either an array or the arguments object from the current method, for example: this.callOverridden(arguments)

                              Returns

                              • Object

                                Returns the result of calling the overridden method

                              Call the "parent" method of the current method. ...

                              Call the "parent" method of the current method. That is the method previously overridden by derivation or by an override (see Ext.define).

                               Ext.define('My.Base', {
                                   constructor: function (x) {
                                       this.x = x;
                                   },
                              
                                   statics: {
                                       method: function (x) {
                                           return x;
                                       }
                                   }
                               });
                              
                               Ext.define('My.Derived', {
                                   extend: 'My.Base',
                              
                                   constructor: function () {
                                       this.callParent([21]);
                                   }
                               });
                              
                               var obj = new My.Derived();
                              
                               alert(obj.x);  // alerts 21
                              

                              This can be used with an override as follows:

                               Ext.define('My.DerivedOverride', {
                                   override: 'My.Derived',
                              
                                   constructor: function (x) {
                                       this.callParent([x*2]); // calls original My.Derived constructor
                                   }
                               });
                              
                               var obj = new My.Derived();
                              
                               alert(obj.x);  // now alerts 42
                              

                              This also works with static methods.

                               Ext.define('My.Derived2', {
                                   extend: 'My.Base',
                              
                                   statics: {
                                       method: function (x) {
                                           return this.callParent([x*2]); // calls My.Base.method
                                       }
                                   }
                               });
                              
                               alert(My.Base.method(10));     // alerts 10
                               alert(My.Derived2.method(10)); // alerts 20
                              

                              Lastly, it also works with overridden static methods.

                               Ext.define('My.Derived2Override', {
                                   override: 'My.Derived2',
                              
                                   statics: {
                                       method: function (x) {
                                           return this.callParent([x*2]); // calls My.Derived2.method
                                       }
                                   }
                               });
                              
                               alert(My.Derived2.method(10)); // now alerts 40
                              

                              To override a method and replace it and also call the superclass method, use callSuper. This is often done to patch a method to fix a bug.

                              Parameters

                              • args : Array/Arguments

                                The arguments, either an array or the arguments object from the current method, for example: this.callParent(arguments)

                              Returns

                              • Object

                                Returns the result of calling the parent method

                              This method is used by an override to call the superclass method but bypass any overridden method. ...

                              This method is used by an override to call the superclass method but bypass any overridden method. This is often done to "patch" a method that contains a bug but for whatever reason cannot be fixed directly.

                              Consider:

                               Ext.define('Ext.some.Class', {
                                   method: function () {
                                       console.log('Good');
                                   }
                               });
                              
                               Ext.define('Ext.some.DerivedClass', {
                                   method: function () {
                                       console.log('Bad');
                              
                                       // ... logic but with a bug ...
                              
                                       this.callParent();
                                   }
                               });
                              

                              To patch the bug in DerivedClass.method, the typical solution is to create an override:

                               Ext.define('App.paches.DerivedClass', {
                                   override: 'Ext.some.DerivedClass',
                              
                                   method: function () {
                                       console.log('Fixed');
                              
                                       // ... logic but with bug fixed ...
                              
                                       this.callSuper();
                                   }
                               });
                              

                              The patch method cannot use callParent to call the superclass method since that would call the overridden method containing the bug. In other words, the above patch would only produce "Fixed" then "Good" in the console log, whereas, using callParent would produce "Fixed" then "Bad" then "Good".

                              Parameters

                              • args : Array/Arguments

                                The arguments, either an array or the arguments object from the current method, for example: this.callSuper(arguments)

                              Returns

                              • Object

                                Returns the result of calling the superclass method

                              ( actionFn, eventName, fn, scope, options, order ) : Ext.mixin.Observablechainableprivate
                              ...

                              Parameters

                              Returns

                              Ext.data.Store
                              view source
                              ( )private
                              ...

                              Fires

                                Ext.data.Store
                                view source
                                ( [suppressEvent] )
                                Reverts to a view of the Record cache with no filtering applied. ...

                                Reverts to a view of the Record cache with no filtering applied.

                                Parameters

                                • suppressEvent : Boolean (optional)

                                  true to clear silently without firing the refresh event.

                                  Defaults to: false

                                Fires

                                Removes all listeners for this object. ...

                                Removes all listeners for this object.

                                Fires

                                  ...

                                  Parameters

                                  Fires

                                    ...

                                    Parameters

                                    Fires

                                      Creates an event handling function which re-fires the event from this object as the passed event name. ...

                                      Creates an event handling function which re-fires the event from this object as the passed event name.

                                      Parameters

                                      Returns

                                      Fires

                                        Ext.data.Store
                                        view source
                                        ( )protected
                                        ...

                                        Fires

                                        • destroy

                                        Overrides: Ext.mixin.Observable.destroy

                                        ( name, fn, scope, options, order ) : Booleanprivate
                                        ...

                                        Parameters

                                        Returns

                                        Fires

                                          Ext.data.Store
                                          view source
                                          ( store, data, operation )private
                                          ...

                                          Parameters

                                          Fires

                                          ( eventName, args, action, connectedController )private
                                          ...

                                          Parameters

                                          Fires

                                            Ext.data.Store
                                            view source
                                            ( silent )private
                                            ...

                                            Parameters

                                            Fires

                                            ( name, fn, scope, options, order )private
                                            ...

                                            Parameters

                                            Fires

                                              ( me, value, oldValue, options )private
                                              ...

                                              Parameters

                                              Ext.data.Store
                                              view source
                                              ( fn, [scope] )
                                              Calls the specified function for each of the Records in the cache. ...

                                              Calls the specified function for each of the Records in the cache.

                                              // Set up a model to use in our Store
                                              Ext.define('User', {
                                                  extend: 'Ext.data.Model',
                                                  config: {
                                                      fields: [
                                                          {name: 'firstName', type: 'string'},
                                                          {name: 'lastName', type: 'string'}
                                                      ]
                                                  }
                                              });
                                              
                                              var store = Ext.create('Ext.data.Store', {
                                                  model: 'User',
                                                  data : [
                                                      {firstName: 'Ed',    lastName: 'Spencer'},
                                                      {firstName: 'Tommy', lastName: 'Maintz'},
                                                      {firstName: 'Aaron', lastName: 'Conran'},
                                                      {firstName: 'Jamie', lastName: 'Avins'}
                                                  ]
                                              });
                                              
                                              store.each(function (item, index, length) {
                                                  console.log(item.get('firstName'), index);
                                              });
                                              

                                              Parameters

                                              • fn : Function

                                                The function to call. Returning false aborts and exits the iteration.

                                                Parameters

                                              • scope : Object (optional)

                                                The scope (this reference) in which the function is executed. Defaults to the current Record in the iteration.

                                              Enables 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.

                                              Parameters

                                              • events : String/String[]

                                                The event name to bubble, or an Array of event names.

                                              Fires

                                                Ext.data.Store
                                                view source
                                                ( filters, [value], [anyMatch], [caseSensitive] )
                                                Filters the loaded set of records by a given set of filters. ...

                                                Filters the loaded set of records by a given set of filters.

                                                Filtering by single field:

                                                store.filter("email", /\.com$/);
                                                

                                                Using multiple filters:

                                                store.filter([
                                                    {property: "email", value: /\.com$/},
                                                    {filterFn: function(item) { return item.get("age") > 10; }}
                                                ]);
                                                

                                                Using Ext.util.Filter instances instead of config objects (note that we need to specify the root config option in this case):

                                                store.filter([
                                                    Ext.create('Ext.util.Filter', {property: "email", value: /\.com$/, root: 'data'}),
                                                    Ext.create('Ext.util.Filter', {filterFn: function(item) { return item.get("age") > 10; }, root: 'data'})
                                                ]);
                                                

                                                If the remoteFilter configuration has been set to true, you will have to manually call the load method after you filter to retrieve the filtered data from the server.

                                                Parameters

                                                • filters : Object[]/Ext.util.Filter[]/String

                                                  The set of filters to apply to the data. These are stored internally on the store, but the filtering itself is done on the Store's MixedCollection. See MixedCollection's filter method for filter syntax. Alternatively, pass in a property string.

                                                • value : String (optional)

                                                  value to filter by (only if using a property string as the first argument).

                                                • anyMatch : Boolean (optional)

                                                  true to allow any match, false to anchor regex beginning with ^.

                                                  Defaults to: false

                                                • caseSensitive : Boolean (optional)

                                                  true to make the filtering regex case sensitive.

                                                  Defaults to: false

                                                Fires

                                                Ext.data.Store
                                                view source
                                                ( fn, [scope] )
                                                Filter by a function. ...

                                                Filter by a function. The specified function will be called for each Record in this Store. If the function returns true the Record is included, otherwise it is filtered out.

                                                Parameters

                                                • fn : Function

                                                  The function to be called. It will be passed the following parameters:

                                                  Parameters

                                                • scope : Object (optional)

                                                  The scope (this reference) in which the function is executed. Defaults to this Store.

                                                Fires

                                                Ext.data.Store
                                                view source
                                                ( fieldName, value, [startIndex], [anyMatch], [caseSensitive], [exactMatch] ) : Number
                                                Finds 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 : String

                                                  The name of the Record field to test.

                                                • value : String/RegExp

                                                  Either 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 at.

                                                • anyMatch : Boolean (optional)

                                                  true to match any part of the string, not just the beginning.

                                                • caseSensitive : Boolean (optional)

                                                  true for case sensitive comparison.

                                                • exactMatch : Boolean (optional)

                                                  true to force exact match (^ and $ characters added to the regex).

                                                  Defaults to: false

                                                Returns

                                                • Number

                                                  The matched index or -1

                                                Ext.data.Store
                                                view source
                                                ( fn, [scope], [startIndex] ) : Number
                                                Find the index of the first matching Record in this Store by a function. ...

                                                Find the index of the first matching Record in this Store by a function. If the function returns true it is considered a match.

                                                Parameters

                                                • fn : Function

                                                  The function to be called. It will be passed the following parameters:

                                                  Parameters

                                                • 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.

                                                Ext.data.Store
                                                view source
                                                ( fieldName, value, [startIndex] ) : Number
                                                Finds 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 : String

                                                  The name of the Record field to test.

                                                • value : Object

                                                  The value to match the field against.

                                                • startIndex : Number (optional)

                                                  The index to start searching at.

                                                Returns

                                                • Number

                                                  The matched index or -1.

                                                Ext.data.Store
                                                view source
                                                ( fieldName, value, [startIndex], [anyMatch], [caseSensitive], [exactMatch] ) : Ext.data.Model
                                                Finds the first matching Record in this store by a specific field value. ...

                                                Finds the first matching Record in this store by a specific field value.

                                                Parameters

                                                • fieldName : String

                                                  The name of the Record field to test.

                                                • value : String/RegExp

                                                  Either 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 at.

                                                • anyMatch : Boolean (optional)

                                                  true to match any part of the string, not just the beginning.

                                                • caseSensitive : Boolean (optional)

                                                  true for case sensitive comparison.

                                                • exactMatch : Boolean (optional)

                                                  true to force exact match (^ and $ characters added to the regex).

                                                  Defaults to: false

                                                Returns

                                                Fires

                                                  ( eventName, args, fn, scope ) : Object
                                                  Fires the specified event with the passed parameters and execute a function (action) at the end if there are no liste...

                                                  Fires the specified event with the passed parameters and execute a function (action) at the end if there are no listeners that return false.

                                                  Parameters

                                                  • eventName : String

                                                    The name of the event to fire.

                                                  • args : Array

                                                    Arguments to pass to handers.

                                                  • fn : Function

                                                    Action.

                                                  • scope : Object

                                                    Scope of fn.

                                                  Returns

                                                  Fires

                                                    Fires the specified event with the passed parameters (minus the event name, plus the options object passed to addList...

                                                    Fires the specified event with the passed parameters (minus the event name, plus the options object passed to addListener).

                                                    The first argument is the name of the event. Every other argument passed will be available when you listen for the event.

                                                    Example

                                                    Firstly, we set up a listener for our new event.

                                                    this.on('myevent', function(arg1, arg2, arg3, arg4, options, e) {
                                                        console.log(arg1); // true
                                                        console.log(arg2); // 2
                                                        console.log(arg3); // { test: 'foo' }
                                                        console.log(arg4); // 14
                                                        console.log(options); // the options added when adding the listener
                                                        console.log(e); // the event object with information about the event
                                                    });
                                                    

                                                    And then we can fire off the event.

                                                    this.fireEvent('myevent', true, 2, { test: 'foo' }, 14);
                                                    

                                                    An event may be set to bubble up an Observable parent hierarchy by calling enableBubble.

                                                    Parameters

                                                    • eventName : String

                                                      The name of the event to fire.

                                                    • args : Object...

                                                      Variable number of parameters are passed to handlers.

                                                    Returns

                                                    • Boolean

                                                      Returns false if any of the handlers return false.

                                                    Fires

                                                      Ext.data.Store
                                                      view source
                                                      ( ) : Ext.data.Model/undefined
                                                      Convenience function for getting the first model instance in the store. ...

                                                      Convenience function for getting the first model instance in the store.

                                                      Returns

                                                      • Ext.data.Model/undefined

                                                        The first model instance in the store, or undefined.

                                                      Ext.data.Store
                                                      view source
                                                      ( ) : Number
                                                      Gets the number of all cached records including the ones currently filtered. ...

                                                      Gets the number of all cached records including the ones currently filtered. If using paging, this may not be the total size of the dataset.

                                                      Returns

                                                      • Number

                                                        The number of all Records in the Store's cache.

                                                      Ext.data.Store
                                                      view source
                                                      ( index ) : Ext.data.Model/undefined
                                                      Get the Record at the specified index. ...

                                                      Get the Record at the specified index.

                                                      Parameters

                                                      • index : Number

                                                        The index of the Record to find.

                                                      Returns

                                                      • Ext.data.Model/undefined

                                                        The Record at the passed index. Returns undefined if not found.

                                                      Ext.data.Store
                                                      view source
                                                      ( ) : Booleanprivate
                                                      Returns the value of autoDestroy. ...

                                                      Returns the value of autoDestroy.

                                                      Returns

                                                      Returns the value of autoLoad. ...

                                                      Returns the value of autoLoad.

                                                      Returns

                                                      Ext.data.Store
                                                      view source
                                                      ( ) : Boolean
                                                      Returns the value of autoSync. ...

                                                      Returns the value of autoSync.

                                                      Returns

                                                      Ext.data.Store
                                                      view source
                                                      ( ) : Objectprivate
                                                      Returns an object which is passed in as the listeners argument to proxy.batch inside this.sync. ...

                                                      Returns an object which is passed in as the listeners argument to proxy.batch inside this.sync. This is broken out into a separate function to allow for customization of the listeners.

                                                      Returns

                                                      Returns the value of bubbleEvents. ...

                                                      Returns the value of bubbleEvents.

                                                      Returns

                                                      Ext.data.Store
                                                      view source
                                                      ( ) : Boolean
                                                      Returns the value of buffered. ...

                                                      Returns the value of buffered.

                                                      Returns

                                                      Ext.data.Store
                                                      view source
                                                      ( id ) : Ext.data.Model/undefined
                                                      Get the Record with the specified id. ...

                                                      Get the Record with the specified id.

                                                      Parameters

                                                      • id : String

                                                        The id of the Record to find.

                                                      Returns

                                                      • Ext.data.Model/undefined

                                                        The Record with the passed id. Returns undefined if not found.

                                                      Returns the value of clearOnPageLoad. ...

                                                      Returns the value of clearOnPageLoad.

                                                      Returns

                                                      ...

                                                      Parameters

                                                      Ext.data.Store
                                                      view source
                                                      ( ) : Number
                                                      Gets the number of cached records. ...

                                                      Gets the number of cached records. Note that filtered records are not included in this count. If using paging, this may not be the total size of the dataset.

                                                      Returns

                                                      • Number

                                                        The number of Records in the Store's cache.

                                                      Returns the value of data. ...

                                                      Returns the value of data.

                                                      Returns

                                                      Returns the value of destroyRemovedRecords. ...

                                                      Returns the value of destroyRemovedRecords.

                                                      Returns

                                                      Returns the value of fields. ...

                                                      Returns the value of fields.

                                                      Returns

                                                      Ext.data.Store
                                                      view source
                                                      ( )private
                                                      ...
                                                      Ext.data.Store
                                                      view source
                                                      ( ) : Functiondeprecated
                                                      Returns the value of getGroupString. ...

                                                      Returns the value of getGroupString.

                                                      This method has been deprecated

                                                      Returns

                                                      Ext.data.Store
                                                      view source
                                                      ( ) : String
                                                      Returns the value of groupDir. ...

                                                      Returns the value of groupDir.

                                                      Returns

                                                      Ext.data.Store
                                                      view source
                                                      ( ) : String
                                                      Returns the value of groupField. ...

                                                      Returns the value of groupField.

                                                      Returns

                                                      Ext.data.Store
                                                      view source
                                                      ( record ) : null
                                                      ...

                                                      Parameters

                                                      Returns

                                                      • null

                                                      Fires

                                                        Ext.data.Store
                                                        view source
                                                        ( ) : Object
                                                        Returns the value of grouper. ...

                                                        Returns the value of grouper.

                                                        Returns

                                                        Ext.data.Store
                                                        view source
                                                        ( [groupName] ) : Object/Object[]
                                                        Returns an array containing the result of applying the grouper to the records in this store. ...

                                                        Returns an array containing the result of applying the grouper to the records in this store. See groupField, groupDir and grouper. Example for a store containing records with a color field:

                                                        var myStore = Ext.create('Ext.data.Store', {
                                                            groupField: 'color',
                                                            groupDir  : 'DESC'
                                                        });
                                                        
                                                        myStore.getGroups(); //returns:
                                                        [
                                                           {
                                                               name: 'yellow',
                                                               children: [
                                                                   //all records where the color field is 'yellow'
                                                               ]
                                                           },
                                                           {
                                                               name: 'red',
                                                               children: [
                                                                   //all records where the color field is 'red'
                                                               ]
                                                           }
                                                        ]
                                                        

                                                        Parameters

                                                        • groupName : String (optional)

                                                          Pass in an optional groupName argument to access a specific group as defined by grouper.

                                                        Returns

                                                        Fires

                                                          Retrieves the id of this component. ...

                                                          Retrieves the id of this component. Will autogenerate an id if one has not already been set.

                                                          Returns

                                                          Fires

                                                            Returns the initial configuration passed to constructor. ...

                                                            Returns the initial configuration passed to constructor.

                                                            Parameters

                                                            • name : String (optional)

                                                              When supplied, value for particular configuration option is returned, otherwise the full config object is returned.

                                                            Returns

                                                            Returns the value of listeners. ...

                                                            Returns the value of listeners.

                                                            Returns

                                                            ...

                                                            Parameters

                                                            Ext.data.Store
                                                            view source
                                                            ( ) : String
                                                            Returns the value of model. ...

                                                            Returns the value of model.

                                                            Returns

                                                            Returns the value of modelDefaults. ...

                                                            Returns the value of modelDefaults.

                                                            Returns

                                                            Returns all Model instances that are either currently a phantom (e.g. ...

                                                            Returns all Model instances that are either currently a phantom (e.g. have no id), or have an ID but have not yet been saved on this Store (this happens when adding a non-phantom record from another Store into this one).

                                                            Returns

                                                            Ext.data.Store
                                                            view source
                                                            ( ) : Number
                                                            Returns the value of pageSize. ...

                                                            Returns the value of pageSize.

                                                            Returns

                                                            Ext.data.Store
                                                            view source
                                                            ( ) : Object
                                                            Returns the value of params. ...

                                                            Returns the value of params.

                                                            Returns

                                                            Returns the value of plugins. ...

                                                            Returns the value of plugins.

                                                            Returns

                                                            Returns the value of proxy. ...

                                                            Returns the value of proxy.

                                                            Returns

                                                            Ext.data.Store
                                                            view source
                                                            ( [startIndex], [endIndex] ) : Ext.data.Model[]
                                                            Returns a range of Records between specified indices. ...

                                                            Returns a range of Records between specified indices. Note that if the store is filtered, only filtered results are returned.

                                                            Parameters

                                                            • startIndex : Number (optional)

                                                              The starting index.

                                                              Defaults to: 0

                                                            • endIndex : Number (optional)

                                                              The ending index (defaults to the last Record in the Store).

                                                              Defaults to: -1

                                                            Returns

                                                            Returns the value of remoteFilter. ...

                                                            Returns the value of remoteFilter.

                                                            Returns

                                                            Returns the value of remoteGroup. ...

                                                            Returns the value of remoteGroup.

                                                            Returns

                                                            Returns the value of remoteSort. ...

                                                            Returns the value of remoteSort.

                                                            Returns

                                                            Returns any records that have been removed from the store but not yet destroyed on the proxy. ...

                                                            Returns any records that have been removed from the store but not yet destroyed on the proxy.

                                                            Returns

                                                            Ext.data.Store
                                                            view source
                                                            ( )private
                                                            ...
                                                            Ext.data.Store
                                                            view source
                                                            ( ) : String
                                                            Returns the value of storeId. ...

                                                            Returns the value of storeId.

                                                            Returns

                                                            Returns the value of syncRemovedRecords. ...

                                                            Returns the value of syncRemovedRecords.

                                                            Returns

                                                            Ext.data.Store
                                                            view source
                                                            ( ) : Number
                                                            Returns the value of totalCount. ...

                                                            Returns the value of totalCount.

                                                            Returns

                                                            Returns all Model instances that have been updated in the Store but not yet synchronized with the Proxy. ...

                                                            Returns all Model instances that have been updated in the Store but not yet synchronized with the Proxy.

                                                            Returns

                                                            ...

                                                            Parameters

                                                            Checks to see if this object has any listeners for a specified event ...

                                                            Checks to see if this object has any listeners for a specified event

                                                            Parameters

                                                            • eventName : String

                                                              The name of the event to check for

                                                            Returns

                                                            • Boolean

                                                              True if the event is being listened for, else false

                                                            Fires

                                                              Ext.data.Store
                                                              view source
                                                              ( record ) : Number
                                                              Get the index within the cache of the passed Record. ...

                                                              Get the index within the cache of the passed Record.

                                                              Parameters

                                                              Returns

                                                              • Number

                                                                The index of the passed Record. Returns -1 if not found.

                                                              Ext.data.Store
                                                              view source
                                                              ( id ) : Number
                                                              Get the index within the cache of the Record with the passed id. ...

                                                              Get the index within the cache of the Record with the passed id.

                                                              Parameters

                                                              • id : String

                                                                The id of the Record to find.

                                                              Returns

                                                              • Number

                                                                The index of the Record. Returns -1 if not found.

                                                              ( instanceConfig ) : Objectchainableprotected
                                                              Initialize configuration for this class. ...

                                                              Initialize configuration for this class. a typical example:

                                                              Ext.define('My.awesome.Class', {
                                                                  // The default config
                                                                  config: {
                                                                      name: 'Awesome',
                                                                      isAwesome: true
                                                                  },
                                                              
                                                                  constructor: function(config) {
                                                                      this.initConfig(config);
                                                                  }
                                                              });
                                                              
                                                              var awesome = new My.awesome.Class({
                                                                  name: 'Super Awesome'
                                                              });
                                                              
                                                              alert(awesome.getName()); // 'Super Awesome'
                                                              

                                                              Parameters

                                                              Returns

                                                              • Object

                                                                mixins The mixin prototypes as key - value pairs

                                                              Fires

                                                                Ext.data.Store
                                                                view source
                                                                ( index, records ) : Object
                                                                Inserts Model instances into the Store at the given index and fires the add event. ...

                                                                Inserts Model instances into the Store at the given index and fires the add event. See also add.

                                                                Parameters

                                                                Returns

                                                                Fires

                                                                Returns true if the Store is set to autoLoad or is a type which loads upon instantiation. ...

                                                                Returns true if the Store is set to autoLoad or is a type which loads upon instantiation.

                                                                Returns

                                                                Fires

                                                                  Ext.data.Store
                                                                  view source
                                                                  ( ) : Boolean
                                                                  Returns true if this store is currently filtered. ...

                                                                  Returns true if this store is currently filtered.

                                                                  Returns

                                                                  Ext.data.Store
                                                                  view source
                                                                  ( ) : Boolean
                                                                  This method tells you if this store has a grouper defined on it. ...

                                                                  This method tells you if this store has a grouper defined on it.

                                                                  Returns

                                                                  • Boolean

                                                                    true if this store has a grouper defined.

                                                                  Fires

                                                                    Ext.data.Store
                                                                    view source
                                                                    ( ) : Boolean
                                                                    Returns true if the Store has been loaded. ...

                                                                    Returns true if the Store has been loaded.

                                                                    Returns

                                                                    • Boolean

                                                                      true if the Store has been loaded.

                                                                    Ext.data.Store
                                                                    view source
                                                                    ( ) : Boolean
                                                                    Returns true if the Store is currently performing a load operation. ...

                                                                    Returns true if the Store is currently performing a load operation.

                                                                    Returns

                                                                    • Boolean

                                                                      true if the Store is currently loading.

                                                                    Ext.data.Store
                                                                    view source
                                                                    ( ) : Boolean
                                                                    Returns true if this store is currently sorted. ...

                                                                    Returns true if this store is currently sorted.

                                                                    Returns

                                                                    Ext.data.Store
                                                                    view source
                                                                    ( ) : Ext.data.Model/undefined
                                                                    Convenience function for getting the last model instance in the store. ...

                                                                    Convenience function for getting the last model instance in the store.

                                                                    Returns

                                                                    • Ext.data.Model/undefined

                                                                      The last model instance in the store, or undefined.

                                                                    Ext.data.Store
                                                                    view source
                                                                    ( [options], [scope] ) : Object
                                                                    Loads data into the Store via the configured proxy. ...

                                                                    Loads data into the Store via the configured proxy. This uses the Proxy to make an asynchronous call to whatever storage backend the Proxy uses, automatically adding the retrieved instances into the Store and calling an optional callback if required. Example usage:

                                                                    store.load({
                                                                        callback: function(records, operation, success) {
                                                                            // the operation object contains all of the details of the load operation
                                                                            console.log(records);
                                                                        },
                                                                        scope: this
                                                                    });
                                                                    

                                                                    If only the callback and scope options need to be specified, then one can call it simply like so:

                                                                    store.load(function(records, operation, success) {
                                                                        console.log('loaded records');
                                                                    }, this);
                                                                    

                                                                    Parameters

                                                                    Returns

                                                                    Fires

                                                                    Ext.data.Store
                                                                    view source
                                                                    ( data, append )deprecated
                                                                    Loads an array of data straight into the Store. ...

                                                                    Loads an array of data straight into the Store.

                                                                    This method has been deprecated since 2.0

                                                                    Please use add or setData instead.

                                                                    Parameters

                                                                    • data : Ext.data.Model[]/Object[]

                                                                      Array of data to load. Any non-model instances will be cast into model instances first.

                                                                    • append : Boolean

                                                                      true to add the records to the existing records in the store, false to remove the old ones first.

                                                                    Ext.data.Store
                                                                    view source
                                                                    ( page, options, scope )
                                                                    Loads a given 'page' of data by setting the start and limit values appropriately. ...

                                                                    Loads a given 'page' of data by setting the start and limit values appropriately. Internally this just causes a normal load operation, passing in calculated start and limit params.

                                                                    Parameters

                                                                    Fires

                                                                    Ext.data.Store
                                                                    view source
                                                                    ( model ) : Ext.data.Model[]deprecated
                                                                    Adds Model instance to the Store. ...

                                                                    Adds Model instance to the Store. This method accepts either:

                                                                    • An array of Model instances or Model configuration objects.
                                                                    • Any number of Model instance or Model configuration object arguments.

                                                                    The new Model instances will be added at the end of the existing collection.

                                                                    Sample usage:

                                                                    myStore.add({some: 'data2'}, {some: 'other data2'});
                                                                    

                                                                    Use addData method instead if you have raw data that need to pass through the data reader.

                                                                    This method has been deprecated since 2.0.0

                                                                    Please use add instead.

                                                                    Parameters

                                                                    • model : Ext.data.Model[]/Ext.data.Model...

                                                                      An array of Model instances or Model configuration objects, or variable number of Model instance or config arguments.

                                                                    Returns

                                                                    Ext.data.Store
                                                                    view source
                                                                    ( field ) : Object/undefined
                                                                    Gets the maximum value in the store. ...

                                                                    Gets the maximum value in the store.

                                                                    Parameters

                                                                    • field : String

                                                                      The field in each record.

                                                                    Returns

                                                                    • Object/undefined

                                                                      The maximum value, if no items exist, undefined.

                                                                    Ext.data.Store
                                                                    view source
                                                                    ( field ) : Object/undefined
                                                                    Gets the minimum value in the store. ...

                                                                    Gets the minimum value in the store.

                                                                    Parameters

                                                                    • field : String

                                                                      The field in each record.

                                                                    Returns

                                                                    • Object/undefined

                                                                      The minimum value, if no items exist, undefined.

                                                                    ( object, eventName, [fn], [scope], [options] )deprecated
                                                                    Alias for addManagedListener. ...

                                                                    Alias for addManagedListener.

                                                                    This method has been deprecated since 2.0.0

                                                                    This is now done automatically

                                                                    Parameters

                                                                    • object : Ext.mixin.Observable/HTMLElement

                                                                      The item to which to add a listener/listeners.

                                                                    • eventName : Object/String

                                                                      The event name, or an object containing event name properties.

                                                                    • fn : Function (optional)

                                                                      If the eventName parameter was an event name, this is the handler function.

                                                                    • scope : Object (optional)

                                                                      If the eventName parameter was an event name, this is the scope in which the handler function is executed.

                                                                    • options : Object (optional)

                                                                      If the eventName parameter was an event name, this is the addListener options.

                                                                    ( object, eventName, [fn], [scope] )deprecated
                                                                    Alias for removeManagedListener. ...

                                                                    Alias for removeManagedListener.

                                                                    This method has been deprecated since 2.0.0

                                                                    This is now done automatically

                                                                    Parameters

                                                                    • object : Ext.mixin.Observable/HTMLElement

                                                                      The item to which to add a listener/listeners.

                                                                    • eventName : Object/String

                                                                      The event name, or an object containing event name properties.

                                                                    • fn : Function (optional)

                                                                      If the eventName parameter was an event name, this is the handler function.

                                                                    • scope : Object (optional)

                                                                      If the eventName parameter was an event name, this is the scope in which the handler function is executed.

                                                                    Ext.data.Store
                                                                    view source
                                                                    ( options )
                                                                    Loads the next 'page' in the current data set. ...

                                                                    Loads the next 'page' in the current data set.

                                                                    Parameters

                                                                    Fires

                                                                    ( eventName, [fn], [scope], [options], [order] )
                                                                    Alias for addListener. ...

                                                                    Alias for addListener.

                                                                    Parameters

                                                                    • eventName : String/String[]/Object

                                                                      The name of the event to listen for. May also be an object who's property names are event names.

                                                                    • fn : Function/String (optional)

                                                                      The method the event invokes. Will be called with arguments given to fireEvent plus the options parameter described below.

                                                                    • 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.

                                                                      This object may contain any of the following properties:

                                                                      • scope : Object (optional)

                                                                        The scope (this reference) in which the handler function is executed. If omitted, defaults to the object which fired the event.

                                                                      • delay : Number (optional)

                                                                        The number of milliseconds to delay the invocation of the handler after the event fires.

                                                                      • single : Boolean (optional)

                                                                        true to add a handler to handle just the next firing of the event, and then remove itself.

                                                                      • order : String (optional)

                                                                        The order of when the listener should be added into the listener queue.

                                                                        If you set an order of before and the event you are listening to is preventable, you can return false and it will stop the event.

                                                                        Available options are before, current and after.

                                                                        Defaults to: current

                                                                      • buffer : Number (optional)

                                                                        Causes the handler to be delayed by the specified number of milliseconds. If the event fires again within that time, the original handler is not invoked, but the new handler is scheduled in its place.

                                                                      • element : String (optional)

                                                                        Allows you to add a listener onto a element of this component using the elements reference.

                                                                        Ext.create('Ext.Component', {
                                                                            listeners: {
                                                                                element: 'element',
                                                                                tap: function() {
                                                                                    alert('element tap!');
                                                                                }
                                                                            }
                                                                        });
                                                                        

                                                                        All components have the element reference, which is the outer most element of the component. Ext.Container also has the innerElement element which contains all children. In most cases element is adequate.

                                                                      • delegate : String (optional)

                                                                        Uses Ext.ComponentQuery to delegate events to a specified query selector within this item.

                                                                        // Create a container with a two children; a button and a toolbar
                                                                        var container = Ext.create('Ext.Container', {
                                                                            items: [
                                                                                {
                                                                                    xtype: 'toolbar',
                                                                                    docked: 'top',
                                                                                    title: 'My Toolbar'
                                                                                },
                                                                                {
                                                                                   xtype: 'button',
                                                                                   text: 'My Button'
                                                                                }
                                                                            ]
                                                                        });
                                                                        
                                                                        container.addListener({
                                                                            // Ext.Buttons have an xtype of 'button', so we use that are a selector for our delegate
                                                                            delegate: 'button',
                                                                        
                                                                            tap: function() {
                                                                                alert('Button tapped!');
                                                                            }
                                                                        });
                                                                        
                                                                    • order : String (optional)

                                                                      The order of when the listener should be added into the listener queue. Possible values are before, current and after.

                                                                      Defaults to: 'current'

                                                                    ( eventName, fn, [scope], [options] )
                                                                    Alias for addAfterListener. ...

                                                                    Alias for addAfterListener.

                                                                    Parameters

                                                                    • eventName : String/String[]/Object

                                                                      The name of the event to listen for.

                                                                    • fn : Function/String

                                                                      The method the event invokes.

                                                                    • scope : Object (optional)

                                                                      The scope for fn.

                                                                    • options : Object (optional)

                                                                      An object containing handler configuration.

                                                                    Ext.data.Store
                                                                    view source
                                                                    ( batch )private
                                                                    Attached as the complete event listener to a proxy's Batch object. ...

                                                                    Attached as the complete event listener to a proxy's Batch object. Iterates over the batch operations and updates the Store's internal data MixedCollection.

                                                                    Parameters

                                                                    Fires

                                                                    Ext.data.Store
                                                                    view source
                                                                    ( batch, operation )private
                                                                    ...

                                                                    Parameters

                                                                    ( eventName, fn, [scope], [options] )
                                                                    Alias for addBeforeListener. ...

                                                                    Alias for addBeforeListener.

                                                                    Parameters

                                                                    • eventName : String/String[]/Object

                                                                      The name of the event to listen for.

                                                                    • fn : Function/String

                                                                      The method the event invokes.

                                                                    • scope : Object (optional)

                                                                      The scope for fn.

                                                                    • options : Object (optional)

                                                                      An object containing handler configuration.

                                                                    Ext.data.Store
                                                                    view source
                                                                    ( cls, data )private
                                                                    ...

                                                                    Parameters

                                                                    Overrides: Ext.Evented.onClassExtended

                                                                    ( names, callback, scope )private
                                                                    ...

                                                                    Parameters

                                                                    Ext.data.Store
                                                                    view source
                                                                    ( records, operation, success )private
                                                                    These methods are now just template methods since updating the records etc is all taken care of by the operation itself. ...

                                                                    These methods are now just template methods since updating the records etc is all taken care of by the operation itself.

                                                                    Parameters

                                                                    Ext.data.Store
                                                                    view source
                                                                    ( records, operation, success )private
                                                                    ...

                                                                    Parameters

                                                                    Ext.data.Store
                                                                    view source
                                                                    ( data )private
                                                                    ...

                                                                    Parameters

                                                                    Fires

                                                                    Ext.data.Store
                                                                    view source
                                                                    ( operation )private
                                                                    Called internally when a Proxy has completed a load request. ...

                                                                    Called internally when a Proxy has completed a load request.

                                                                    Parameters

                                                                    Fires

                                                                    Ext.data.Store
                                                                    view source
                                                                    ( operation )private
                                                                    Callback for any write Operation over the Proxy. ...

                                                                    Callback for any write Operation over the Proxy. Updates the Store's MixedCollection to reflect the updates provided by the Proxy.

                                                                    Parameters

                                                                    Fires

                                                                    Ext.data.Store
                                                                    view source
                                                                    ( records, operation, success )private
                                                                    ...

                                                                    Parameters

                                                                    Ext.data.Store
                                                                    view source
                                                                    ( options )
                                                                    Loads the previous 'page' in the current data set. ...

                                                                    Loads the previous 'page' in the current data set.

                                                                    Parameters

                                                                    Fires

                                                                    Ext.data.Store
                                                                    view source
                                                                    ( fn, [scope] ) : Ext.util.MixedCollection
                                                                    Query the cached records in this Store using a filtering function. ...

                                                                    Query the cached records in this Store using a filtering function. The specified function will be called with each record in this Store. If the function returns true the record is included in the results.

                                                                    Parameters

                                                                    • fn : Function

                                                                      The function to be called. It will be passed the following parameters:

                                                                      Parameters

                                                                    • scope : Object (optional)

                                                                      The scope (this reference) in which the function is executed. Defaults to this Store.

                                                                    Returns

                                                                    ( args, fn, scope, options, order )private
                                                                    ...

                                                                    Parameters

                                                                    Fires

                                                                      Relays 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

                                                                      • object : Object

                                                                        The Observable whose events this object is to relay.

                                                                      • events : String/Array/Object

                                                                        Array of event names to relay.

                                                                      Returns

                                                                      Fires

                                                                        Ext.data.Store
                                                                        view source
                                                                        ( records )
                                                                        Removes the given record from the Store, firing the removerecords event passing all the instances that are removed. ...

                                                                        Removes the given record from the Store, firing the removerecords event passing all the instances that are removed.

                                                                        Parameters

                                                                        Fires

                                                                        ( eventName, fn, [scope], [options] )
                                                                        Removes a before-event handler. ...

                                                                        Removes a before-event handler.

                                                                        Same as removeListener with order set to 'after'.

                                                                        Parameters

                                                                        • eventName : String/String[]/Object

                                                                          The name of the event the handler was associated with.

                                                                        • fn : Function/String

                                                                          The handler to remove.

                                                                        • scope : Object (optional)

                                                                          The scope originally specified for fn.

                                                                        • options : Object (optional)

                                                                          Extra options object.

                                                                        Fires

                                                                          Ext.data.Store
                                                                          view source
                                                                          ( [silent] )
                                                                          Remove all items from the store. ...

                                                                          Remove all items from the store.

                                                                          Parameters

                                                                          • silent : Boolean (optional)

                                                                            Prevent the clear event from being fired.

                                                                          Fires

                                                                            Ext.data.Store
                                                                            view source
                                                                            ( index )
                                                                            Removes the model instance at the given index. ...

                                                                            Removes the model instance at the given index.

                                                                            Parameters

                                                                            • index : Number

                                                                              The record index.

                                                                            Fires

                                                                            ( eventName, fn, [scope], [options] )
                                                                            Removes a before-event handler. ...

                                                                            Removes a before-event handler.

                                                                            Same as removeListener with order set to 'before'.

                                                                            Parameters

                                                                            • eventName : String/String[]/Object

                                                                              The name of the event the handler was associated with.

                                                                            • fn : Function/String

                                                                              The handler to remove.

                                                                            • scope : Object (optional)

                                                                              The scope originally specified for fn.

                                                                            • options : Object (optional)

                                                                              Extra options object.

                                                                            Fires

                                                                              ( selector, name, fn, scope, order )private
                                                                              ...

                                                                              Parameters

                                                                              Fires

                                                                                ( eventName, fn, [scope], [options], [order] )
                                                                                Removes an event handler. ...

                                                                                Removes an event handler.

                                                                                Parameters

                                                                                • eventName : String/String[]/Object

                                                                                  The type of event the handler was associated with.

                                                                                • fn : Function/String

                                                                                  The handler to remove. This must be a reference to the function passed into the addListener call.

                                                                                • scope : Object (optional)

                                                                                  The scope originally specified for the handler. It must be the same as the scope argument specified in the original call to addListener or the listener will not be removed.

                                                                                • options : Object (optional)

                                                                                  Extra options object. See addListener for details.

                                                                                • order : String (optional)

                                                                                  The order of the listener to remove. Possible values are before, current and after.

                                                                                  Defaults to: 'current'

                                                                                Fires

                                                                                  ( object, eventName, [fn], [scope] )deprecated
                                                                                  Adds listeners to any Observable object (or Element) which are automatically removed when this Component is destroyed. ...

                                                                                  Adds listeners to any Observable object (or Element) which are automatically removed when this Component is destroyed.

                                                                                  This method has been deprecated since 2.0

                                                                                  All listeners are now automatically managed where necessary. Simply use removeListener.

                                                                                  Parameters

                                                                                  • object : Ext.mixin.Observable/HTMLElement

                                                                                    The item to which to add a listener/listeners.

                                                                                  • eventName : Object/String

                                                                                    The event name, or an object containing event name properties.

                                                                                  • fn : Function (optional)

                                                                                    If the eventName parameter was an event name, this is the handler function.

                                                                                  • scope : Object (optional)

                                                                                    If the eventName parameter was an event name, this is the scope in which the handler function is executed.

                                                                                  Resumes firing events (see suspendEvents). ...

                                                                                  Resumes firing events (see suspendEvents).

                                                                                  Parameters

                                                                                  • discardQueuedEvents : Boolean

                                                                                    Pass as true to discard any queued events.

                                                                                  Ext.data.Store
                                                                                  view source
                                                                                  ( autoDestroy )private
                                                                                  Sets the value of autoDestroy. ...

                                                                                  Sets the value of autoDestroy.

                                                                                  Parameters

                                                                                  Ext.data.Store
                                                                                  view source
                                                                                  ( autoLoad )
                                                                                  Sets the value of autoLoad. ...

                                                                                  Sets the value of autoLoad.

                                                                                  Parameters

                                                                                  Ext.data.Store
                                                                                  view source
                                                                                  ( autoSync )
                                                                                  Sets the value of autoSync. ...

                                                                                  Sets the value of autoSync.

                                                                                  Parameters

                                                                                  Sets the value of bubbleEvents. ...

                                                                                  Sets the value of bubbleEvents.

                                                                                  Parameters

                                                                                  Ext.data.Store
                                                                                  view source
                                                                                  ( buffered )
                                                                                  Sets the value of buffered. ...

                                                                                  Sets the value of buffered.

                                                                                  Parameters

                                                                                  Ext.data.Store
                                                                                  view source
                                                                                  ( clearOnPageLoad )
                                                                                  Sets the value of clearOnPageLoad. ...

                                                                                  Sets the value of clearOnPageLoad.

                                                                                  Parameters

                                                                                  ( config, applyIfNotSet ) : Ext.Basechainableprivate
                                                                                  ...

                                                                                  Parameters

                                                                                  Returns

                                                                                  Ext.data.Store
                                                                                  view source
                                                                                  ( data )
                                                                                  Sets the value of data. ...

                                                                                  Sets the value of data.

                                                                                  Parameters

                                                                                  Ext.data.Store
                                                                                  view source
                                                                                  ( destroyRemovedRecords )
                                                                                  Sets the value of destroyRemovedRecords. ...

                                                                                  Sets the value of destroyRemovedRecords.

                                                                                  Parameters

                                                                                  Ext.data.Store
                                                                                  view source
                                                                                  ( fields ) : Object
                                                                                  Sets the value of fields. ...

                                                                                  Sets the value of fields.

                                                                                  Parameters

                                                                                  Returns

                                                                                  Ext.data.Store
                                                                                  view source
                                                                                  ( filters )
                                                                                  Sets the value of filters. ...

                                                                                  Sets the value of filters.

                                                                                  Parameters

                                                                                  Ext.data.Store
                                                                                  view source
                                                                                  ( getGroupString )deprecated
                                                                                  Sets the value of getGroupString. ...

                                                                                  Sets the value of getGroupString.

                                                                                  This method has been deprecated

                                                                                  Parameters

                                                                                  Ext.data.Store
                                                                                  view source
                                                                                  ( groupDir )
                                                                                  Sets the value of groupDir. ...

                                                                                  Sets the value of groupDir.

                                                                                  Parameters

                                                                                  Ext.data.Store
                                                                                  view source
                                                                                  ( groupField )
                                                                                  Sets the value of groupField. ...

                                                                                  Sets the value of groupField.

                                                                                  Parameters

                                                                                  Ext.data.Store
                                                                                  view source
                                                                                  ( grouper )
                                                                                  Sets the value of grouper. ...

                                                                                  Sets the value of grouper.

                                                                                  Parameters

                                                                                  ...

                                                                                  Parameters

                                                                                  Sets the value of listeners. ...

                                                                                  Sets the value of listeners.

                                                                                  Parameters

                                                                                  Ext.data.Store
                                                                                  view source
                                                                                  ( model )
                                                                                  Sets the value of model. ...

                                                                                  Sets the value of model.

                                                                                  Parameters

                                                                                  Ext.data.Store
                                                                                  view source
                                                                                  ( modelDefaults )
                                                                                  Sets the value of modelDefaults. ...

                                                                                  Sets the value of modelDefaults.

                                                                                  Parameters

                                                                                  Ext.data.Store
                                                                                  view source
                                                                                  ( pageSize )
                                                                                  Sets the value of pageSize. ...

                                                                                  Sets the value of pageSize.

                                                                                  Parameters

                                                                                  Ext.data.Store
                                                                                  view source
                                                                                  ( params )
                                                                                  Sets the value of params. ...

                                                                                  Sets the value of params.

                                                                                  Parameters

                                                                                  Ext.data.Store
                                                                                  view source
                                                                                  ( plugins )
                                                                                  Sets the value of plugins. ...

                                                                                  Sets the value of plugins.

                                                                                  Parameters

                                                                                  Ext.data.Store
                                                                                  view source
                                                                                  ( proxy )
                                                                                  Sets the value of proxy. ...

                                                                                  Sets the value of proxy.

                                                                                  Parameters

                                                                                  Ext.data.Store
                                                                                  view source
                                                                                  ( remoteFilter )
                                                                                  Sets the value of remoteFilter. ...

                                                                                  Sets the value of remoteFilter.

                                                                                  Parameters

                                                                                  Ext.data.Store
                                                                                  view source
                                                                                  ( remoteGroup )
                                                                                  Sets the value of remoteGroup. ...

                                                                                  Sets the value of remoteGroup.

                                                                                  Parameters

                                                                                  Ext.data.Store
                                                                                  view source
                                                                                  ( remoteSort )
                                                                                  Sets the value of remoteSort. ...

                                                                                  Sets the value of remoteSort.

                                                                                  Parameters

                                                                                  Ext.data.Store
                                                                                  view source
                                                                                  ( sorters )
                                                                                  Sets the value of sorters. ...

                                                                                  Sets the value of sorters.

                                                                                  Parameters

                                                                                  Ext.data.Store
                                                                                  view source
                                                                                  ( storeId )
                                                                                  Sets the value of storeId. ...

                                                                                  Sets the value of storeId.

                                                                                  Parameters

                                                                                  Ext.data.Store
                                                                                  view source
                                                                                  ( syncRemovedRecords )
                                                                                  Sets the value of syncRemovedRecords. ...

                                                                                  Sets the value of syncRemovedRecords.

                                                                                  Parameters

                                                                                  Ext.data.Store
                                                                                  view source
                                                                                  ( totalCount )
                                                                                  Sets the value of totalCount. ...

                                                                                  Sets the value of totalCount.

                                                                                  Parameters

                                                                                  Ext.data.Store
                                                                                  view source
                                                                                  ( sorters, [defaultDirection], [where] )
                                                                                  Sorts the data in the Store by one or more of its properties. ...

                                                                                  Sorts the data in the Store by one or more of its properties. Example usage:

                                                                                  // sort by a single field
                                                                                  myStore.sort('myField', 'DESC');
                                                                                  
                                                                                  // sorting by multiple fields
                                                                                  myStore.sort([
                                                                                      {
                                                                                          property : 'age',
                                                                                          direction: 'ASC'
                                                                                      },
                                                                                      {
                                                                                          property : 'name',
                                                                                          direction: 'DESC'
                                                                                      }
                                                                                  ]);
                                                                                  

                                                                                  Internally, Store converts the passed arguments into an array of Ext.util.Sorter instances, and delegates the actual sorting to its internal Ext.util.Collection.

                                                                                  When passing a single string argument to sort, Store maintains a ASC/DESC toggler per field, so this code:

                                                                                  store.sort('myField');
                                                                                  store.sort('myField');
                                                                                  

                                                                                  is equivalent to this code:

                                                                                  store.sort('myField', 'ASC');
                                                                                  store.sort('myField', 'DESC');
                                                                                  

                                                                                  because Store handles the toggling automatically.

                                                                                  If the remoteSort configuration has been set to true, you will have to manually call the load method after you sort to retrieve the sorted data from the server.

                                                                                  Parameters

                                                                                  • sorters : String/Ext.util.Sorter[]

                                                                                    Either a string name of one of the fields in this Store's configured Model, or an array of sorter configurations.

                                                                                  • defaultDirection : String (optional)

                                                                                    The default overall direction to sort the data by.

                                                                                    Defaults to: ASC

                                                                                  • where : String (optional)

                                                                                    This can be either 'prepend' or 'append'. If you leave this undefined it will clear the current sorters.

                                                                                  Fires

                                                                                  Get the reference to the class from which this object was instantiated. ...

                                                                                  Get the reference to the class from which this object was instantiated. Note that unlike self, this.statics() is scope-independent and it always returns the class from which it was called, regardless of what this points to during run-time

                                                                                  Ext.define('My.Cat', {
                                                                                      statics: {
                                                                                          totalCreated: 0,
                                                                                          speciesName: 'Cat' // My.Cat.speciesName = 'Cat'
                                                                                      },
                                                                                  
                                                                                      constructor: function() {
                                                                                          var statics = this.statics();
                                                                                  
                                                                                          alert(statics.speciesName);     // always equals to 'Cat' no matter what 'this' refers to
                                                                                                                          // equivalent to: My.Cat.speciesName
                                                                                  
                                                                                          alert(this.self.speciesName);   // dependent on 'this'
                                                                                  
                                                                                          statics.totalCreated++;
                                                                                      },
                                                                                  
                                                                                      clone: function() {
                                                                                          var cloned = new this.self();                    // dependent on 'this'
                                                                                  
                                                                                          cloned.groupName = this.statics().speciesName;   // equivalent to: My.Cat.speciesName
                                                                                  
                                                                                          return cloned;
                                                                                      }
                                                                                  });
                                                                                  
                                                                                  
                                                                                  Ext.define('My.SnowLeopard', {
                                                                                      extend: 'My.Cat',
                                                                                  
                                                                                      statics: {
                                                                                          speciesName: 'Snow Leopard'     // My.SnowLeopard.speciesName = 'Snow Leopard'
                                                                                      },
                                                                                  
                                                                                      constructor: function() {
                                                                                          this.callParent();
                                                                                      }
                                                                                  });
                                                                                  
                                                                                  var cat = new My.Cat();                 // alerts 'Cat', then alerts 'Cat'
                                                                                  
                                                                                  var snowLeopard = new My.SnowLeopard(); // alerts 'Cat', then alerts 'Snow Leopard'
                                                                                  
                                                                                  var clone = snowLeopard.clone();
                                                                                  alert(Ext.getClassName(clone));         // alerts 'My.SnowLeopard'
                                                                                  alert(clone.groupName);                 // alerts 'Cat'
                                                                                  
                                                                                  alert(My.Cat.totalCreated);             // alerts 3
                                                                                  

                                                                                  Returns

                                                                                  Ext.data.Store
                                                                                  view source
                                                                                  ( field ) : Number
                                                                                  Sums 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 and end and returns the result.

                                                                                  Parameters

                                                                                  • field : String

                                                                                    The field in each record.

                                                                                  Returns

                                                                                  Suspends the firing of all events. ...

                                                                                  Suspends the firing of all events.

                                                                                  All events will be queued but you can discard the queued events by passing false in the resumeEvents call

                                                                                  Ext.data.Store
                                                                                  view source
                                                                                  ( options ) : Object
                                                                                  Synchronizes the Store with its Proxy. ...

                                                                                  Synchronizes the Store with its Proxy. This asks the Proxy to batch together any new, updated and deleted records in the store, updating the Store's internal representation of the records as each operation completes.

                                                                                  Parameters

                                                                                  Returns

                                                                                  Fires

                                                                                  ( toggle, eventName, fn, scope, options, order )private
                                                                                  ...

                                                                                  Parameters

                                                                                  Fires

                                                                                    ( eventName, fn, [scope], [options], [order] )
                                                                                    Alias for removeListener. ...

                                                                                    Alias for removeListener.

                                                                                    Parameters

                                                                                    • eventName : String/String[]/Object

                                                                                      The type of event the handler was associated with.

                                                                                    • fn : Function/String

                                                                                      The handler to remove. This must be a reference to the function passed into the addListener call.

                                                                                    • scope : Object (optional)

                                                                                      The scope originally specified for the handler. It must be the same as the scope argument specified in the original call to addListener or the listener will not be removed.

                                                                                    • options : Object (optional)

                                                                                      Extra options object. See addListener for details.

                                                                                    • order : String (optional)

                                                                                      The order of the listener to remove. Possible values are before, current and after.

                                                                                      Defaults to: 'current'

                                                                                    ( eventName, fn, [scope], [options] )
                                                                                    Alias for removeAfterListener. ...

                                                                                    Alias for removeAfterListener.

                                                                                    Parameters

                                                                                    • eventName : String/String[]/Object

                                                                                      The name of the event the handler was associated with.

                                                                                    • fn : Function/String

                                                                                      The handler to remove.

                                                                                    • scope : Object (optional)

                                                                                      The scope originally specified for fn.

                                                                                    • options : Object (optional)

                                                                                      Extra options object.

                                                                                    ( eventName, fn, [scope], [options] )
                                                                                    Alias for removeBeforeListener. ...

                                                                                    Alias for removeBeforeListener.

                                                                                    Parameters

                                                                                    • eventName : String/String[]/Object

                                                                                      The name of the event the handler was associated with.

                                                                                    • fn : Function/String

                                                                                      The handler to remove.

                                                                                    • scope : Object (optional)

                                                                                      The scope originally specified for fn.

                                                                                    • options : Object (optional)

                                                                                      Extra options object.

                                                                                    Ext.data.Store
                                                                                    view source
                                                                                    ( autoLoad )private
                                                                                    ...

                                                                                    Parameters

                                                                                    Fires

                                                                                    Ext.data.Store
                                                                                    view source
                                                                                    ( filters )private
                                                                                    ...

                                                                                    Parameters

                                                                                    Ext.data.Store
                                                                                    view source
                                                                                    ( groupDir )private
                                                                                    ...

                                                                                    Parameters

                                                                                    Fires

                                                                                      Ext.data.Store
                                                                                      view source
                                                                                      ( groupField )private
                                                                                      ...

                                                                                      Parameters

                                                                                      Fires

                                                                                        Ext.data.Store
                                                                                        view source
                                                                                        ( grouper, oldGrouper )private
                                                                                        ...

                                                                                        Parameters

                                                                                        Fires

                                                                                        Ext.data.Store
                                                                                        view source
                                                                                        ( model )private
                                                                                        ...

                                                                                        Parameters

                                                                                        Fires

                                                                                          Ext.data.Store
                                                                                          view source
                                                                                          ( newPlugins, oldPlugins )private
                                                                                          ...

                                                                                          Parameters

                                                                                          Ext.data.Store
                                                                                          view source
                                                                                          ( proxy, oldProxy )private
                                                                                          ...

                                                                                          Parameters

                                                                                          Fires

                                                                                            Ext.data.Store
                                                                                            view source
                                                                                            ( remoteFilter )private
                                                                                            ...

                                                                                            Parameters

                                                                                            Ext.data.Store
                                                                                            view source
                                                                                            ( remoteSort )private
                                                                                            ...

                                                                                            Parameters

                                                                                            Ext.data.Store
                                                                                            view source
                                                                                            ( )private
                                                                                            ...

                                                                                            Fires

                                                                                              Ext.data.Store
                                                                                              view source
                                                                                              ( sorters )private
                                                                                              ...

                                                                                              Parameters

                                                                                              Fires

                                                                                                Ext.data.Store
                                                                                                view source
                                                                                                ( storeId, oldStoreId )private
                                                                                                ...

                                                                                                Parameters

                                                                                                Defined By

                                                                                                Static methods

                                                                                                ( config, fullMerge )privatestatic
                                                                                                ...

                                                                                                Parameters

                                                                                                ( members )chainableprivatestatic
                                                                                                ...

                                                                                                Parameters

                                                                                                ( name, member )chainableprivatestatic
                                                                                                ...

                                                                                                Parameters

                                                                                                ( members )chainablestatic
                                                                                                Add methods / properties to the prototype of this class. ...

                                                                                                Add methods / properties to the prototype of this class.

                                                                                                Ext.define('My.awesome.Cat', {
                                                                                                    constructor: function() {
                                                                                                        // ...
                                                                                                    }
                                                                                                });
                                                                                                
                                                                                                 My.awesome.Cat.addMembers({
                                                                                                     meow: function() {
                                                                                                        alert('Meowww...');
                                                                                                     }
                                                                                                 });
                                                                                                
                                                                                                 var kitty = new My.awesome.Cat();
                                                                                                 kitty.meow();
                                                                                                

                                                                                                Parameters

                                                                                                ( members ) : Ext.Basechainablestatic
                                                                                                Add / override static properties of this class. ...

                                                                                                Add / override static properties of this class.

                                                                                                Ext.define('My.cool.Class', {
                                                                                                    // this.se
                                                                                                });
                                                                                                
                                                                                                My.cool.Class.addStatics({
                                                                                                    someProperty: 'someValue',      // My.cool.Class.someProperty = 'someValue'
                                                                                                    method1: function() {  },    // My.cool.Class.method1 = function() { ... };
                                                                                                    method2: function() {  }     // My.cool.Class.method2 = function() { ... };
                                                                                                });
                                                                                                

                                                                                                Parameters

                                                                                                Returns

                                                                                                ( xtype )chainableprivatestatic
                                                                                                ...

                                                                                                Parameters

                                                                                                ( fromClass, members ) : Ext.Basechainableprivatestatic
                                                                                                Borrow another class' members to the prototype of this class. ...

                                                                                                Borrow another class' members to the prototype of this class.

                                                                                                Ext.define('Bank', {
                                                                                                    money: '$$$',
                                                                                                    printMoney: function() {
                                                                                                        alert('$$$$$$$');
                                                                                                    }
                                                                                                });
                                                                                                
                                                                                                Ext.define('Thief', {
                                                                                                    // ...
                                                                                                });
                                                                                                
                                                                                                Thief.borrow(Bank, ['money', 'printMoney']);
                                                                                                
                                                                                                var steve = new Thief();
                                                                                                
                                                                                                alert(steve.money); // alerts '$$$'
                                                                                                steve.printMoney(); // alerts '$$$$$$$'
                                                                                                

                                                                                                Parameters

                                                                                                • fromClass : Ext.Base

                                                                                                  The class to borrow members from

                                                                                                • members : Array/String

                                                                                                  The names of the members to borrow

                                                                                                Returns

                                                                                                ( args )protectedstatic
                                                                                                ...

                                                                                                Parameters

                                                                                                Ext.data.Store
                                                                                                view source
                                                                                                ( store )privatestatic
                                                                                                ...

                                                                                                Parameters

                                                                                                Overrides: Ext.Base.create

                                                                                                ( alias, origin )static
                                                                                                Create aliases for existing prototype methods. ...

                                                                                                Create aliases for existing prototype methods. Example:

                                                                                                Ext.define('My.cool.Class', {
                                                                                                    method1: function() {  },
                                                                                                    method2: function() {  }
                                                                                                });
                                                                                                
                                                                                                var test = new My.cool.Class();
                                                                                                
                                                                                                My.cool.Class.createAlias({
                                                                                                    method3: 'method1',
                                                                                                    method4: 'method2'
                                                                                                });
                                                                                                
                                                                                                test.method3(); // test.method1()
                                                                                                
                                                                                                My.cool.Class.createAlias('method5', 'method3');
                                                                                                
                                                                                                test.method5(); // test.method3() -> test.method1()
                                                                                                

                                                                                                Parameters

                                                                                                ( parent )privatestatic
                                                                                                ...

                                                                                                Parameters

                                                                                                Get the current class' name in string format. ...

                                                                                                Get the current class' name in string format.

                                                                                                Ext.define('My.cool.Class', {
                                                                                                    constructor: function() {
                                                                                                        alert(this.self.getName()); // alerts 'My.cool.Class'
                                                                                                    }
                                                                                                });
                                                                                                
                                                                                                My.cool.Class.getName(); // 'My.cool.Class'
                                                                                                

                                                                                                Returns

                                                                                                ...
                                                                                                ( name, mixinClass )privatestatic
                                                                                                Used internally by the mixins pre-processor ...

                                                                                                Used internally by the mixins pre-processor

                                                                                                Parameters

                                                                                                ( fn, scope )chainableprivatestatic
                                                                                                ...

                                                                                                Parameters

                                                                                                ( members ) : Ext.Basechainabledeprecatedstatic
                                                                                                Override members of this class. ...

                                                                                                Override members of this class. Overridden methods can be invoked via callParent.

                                                                                                Ext.define('My.Cat', {
                                                                                                    constructor: function() {
                                                                                                        alert("I'm a cat!");
                                                                                                    }
                                                                                                });
                                                                                                
                                                                                                My.Cat.override({
                                                                                                    constructor: function() {
                                                                                                        alert("I'm going to be a cat!");
                                                                                                
                                                                                                        var instance = this.callParent(arguments);
                                                                                                
                                                                                                        alert("Meeeeoooowwww");
                                                                                                
                                                                                                        return instance;
                                                                                                    }
                                                                                                });
                                                                                                
                                                                                                var kitty = new My.Cat(); // alerts "I'm going to be a cat!"
                                                                                                                          // alerts "I'm a cat!"
                                                                                                                          // alerts "Meeeeoooowwww"
                                                                                                

                                                                                                As of 2.1, direct use of this method is deprecated. Use Ext.define instead:

                                                                                                Ext.define('My.CatOverride', {
                                                                                                    override: 'My.Cat',
                                                                                                
                                                                                                    constructor: function() {
                                                                                                        alert("I'm going to be a cat!");
                                                                                                
                                                                                                        var instance = this.callParent(arguments);
                                                                                                
                                                                                                        alert("Meeeeoooowwww");
                                                                                                
                                                                                                        return instance;
                                                                                                    }
                                                                                                });
                                                                                                

                                                                                                The above accomplishes the same result but can be managed by the Ext.Loader which can properly order the override and its target class and the build process can determine whether the override is needed based on the required state of the target class (My.Cat).

                                                                                                This method has been deprecated since 2.1.0

                                                                                                Please use Ext.define instead

                                                                                                Parameters

                                                                                                • members : Object

                                                                                                  The properties to add to this class. This should be specified as an object literal containing one or more properties.

                                                                                                Returns

                                                                                                Defined By

                                                                                                Events

                                                                                                Ext.data.Store
                                                                                                view source
                                                                                                ( store, records, eOpts )
                                                                                                Fired when one or more new Model instances have been added to this Store. ...

                                                                                                Fired when one or more new Model instances have been added to this Store. You should listen for this event if you have to update a representation of the records in this store in your UI. If you need the indices of the records that were added please use the store.indexOf(record) method.

                                                                                                Parameters

                                                                                                Ext.data.Store
                                                                                                view source
                                                                                                ( store, operation, eOpts )
                                                                                                Fires before a request is made for a new data object. ...

                                                                                                Fires before a request is made for a new data object. If the beforeload handler returns false the load action will be canceled. Note that you should not listen for this event in order to refresh the data view. Use the refresh event for this instead.

                                                                                                Parameters

                                                                                                Ext.data.Store
                                                                                                view source
                                                                                                ( options, eOpts )
                                                                                                Fired before a call to sync is executed. ...

                                                                                                Fired before a call to sync is executed. Return false from any listener to cancel the sync

                                                                                                Parameters

                                                                                                Ext.data.Store
                                                                                                view source
                                                                                                ( this, eOpts )
                                                                                                Fired after the removeAll method is called. ...

                                                                                                Fired after the removeAll method is called. Note that you should not listen for this event in order to refresh the data view. Use the refresh event for this instead.

                                                                                                Parameters

                                                                                                Returns

                                                                                                Ext.data.Store
                                                                                                view source
                                                                                                ( this, records, successful, operation, eOpts )
                                                                                                Fires whenever records have been loaded into the store. ...

                                                                                                Fires whenever records have been loaded into the store. Note that you should not listen for this event in order to refresh the data view. Use the refresh event for this instead.

                                                                                                Parameters

                                                                                                Ext.data.Store
                                                                                                view source
                                                                                                ( this, data, eOpts )
                                                                                                Fires whenever the server has sent back new metadata to reconfigure the Reader. ...

                                                                                                Fires whenever the server has sent back new metadata to reconfigure the Reader.

                                                                                                Parameters

                                                                                                Ext.data.Store
                                                                                                view source
                                                                                                ( this, data, eOpts )
                                                                                                Fires whenever the records in the Store have changed in a way that your representation of the records need to be enti...

                                                                                                Fires whenever the records in the Store have changed in a way that your representation of the records need to be entirely refreshed.

                                                                                                Parameters

                                                                                                Ext.data.Store
                                                                                                view source
                                                                                                ( store, records, indices, eOpts )
                                                                                                Fired when one or more Model instances have been removed from this Store. ...

                                                                                                Fired when one or more Model instances have been removed from this Store. You should listen for this event if you have to update a representation of the records in this store in your UI.

                                                                                                Parameters

                                                                                                • store : Ext.data.Store

                                                                                                  The Store object

                                                                                                • records : Ext.data.Model[]

                                                                                                  The Model instances that was removed

                                                                                                • indices : Number[]

                                                                                                  The indices of the records that were removed. These indices already take into account any potential earlier records that you remove. This means that if you loop over the records, you can get its current index in your data representation from this array.

                                                                                                • eOpts : Object

                                                                                                  The options object passed to Ext.util.Observable.addListener.

                                                                                                Ext.data.Store
                                                                                                view source
                                                                                                ( this, record, newIndex, oldIndex, modifiedFieldNames, modifiedValues, eOpts )removed
                                                                                                Fires when a Model instance has been updated ...

                                                                                                Fires when a Model instance has been updated

                                                                                                This event has been removed since 2.0

                                                                                                Listen to updaterecord instead.

                                                                                                Parameters

                                                                                                • this : Ext.data.Store
                                                                                                • record : Ext.data.Model

                                                                                                  The Model instance that was updated

                                                                                                • newIndex : Number

                                                                                                  If the update changed the index of the record (due to sorting for example), then this gives you the new index in the store.

                                                                                                • oldIndex : Number

                                                                                                  If the update changed the index of the record (due to sorting for example), then this gives you the old index in the store.

                                                                                                • modifiedFieldNames : Array

                                                                                                  An array containing the field names that have been modified since the record was committed or created

                                                                                                • modifiedValues : Object

                                                                                                  An object where each key represents a field name that had it's value modified, and where the value represents the old value for that field. To get the new value in a listener you should use the get method.

                                                                                                • eOpts : Object

                                                                                                  The options object passed to Ext.util.Observable.addListener.

                                                                                                Ext.data.Store
                                                                                                view source
                                                                                                ( this, record, newIndex, oldIndex, modifiedFieldNames, modifiedValues, eOpts )
                                                                                                Fires when a Model instance has been updated ...

                                                                                                Fires when a Model instance has been updated

                                                                                                Parameters

                                                                                                • this : Ext.data.Store
                                                                                                • record : Ext.data.Model

                                                                                                  The Model instance that was updated

                                                                                                • newIndex : Number

                                                                                                  If the update changed the index of the record (due to sorting for example), then this gives you the new index in the store.

                                                                                                • oldIndex : Number

                                                                                                  If the update changed the index of the record (due to sorting for example), then this gives you the old index in the store.

                                                                                                • modifiedFieldNames : Array

                                                                                                  An array containing the field names that have been modified since the record was committed or created

                                                                                                • modifiedValues : Object

                                                                                                  An object where each key represents a field name that had it's value modified, and where the value represents the old value for that field. To get the new value in a listener you should use the get method.

                                                                                                • eOpts : Object

                                                                                                  The options object passed to Ext.util.Observable.addListener.

                                                                                                Ext.data.Store
                                                                                                view source
                                                                                                ( store, operation, eOpts )
                                                                                                Fires whenever a successful write has been made via the configured Proxy ...

                                                                                                Fires whenever a successful write has been made via the configured Proxy

                                                                                                Parameters