2 * @example Sorting Grouping Filtering Store
4 * This example demonstrates {@link Ext.data.Store}'s sorting, grouping, and filtering capabilities.
5 * The data at url `data/users.json` is auto-loaded into the store. The data will be sorted first by name then id;
6 * it will be filtered to only include Users with the name 'Ed' and the data will be grouped by age.
7 * A global variable called "userStore" is created which is an instance of {@link Ext.data.Store}.
8 * Feel free to experiment with the "userStore" object on the console command line.
9 * `userStore.getGroups()` should return an array of groups.
12 extend: 'Ext.data.Model',
14 { name: 'id', type: 'int' },
15 { name: 'name', type: 'string' },
16 { name: 'age', type: 'int' },
17 { name: 'bob', type: 'int' }
23 Ext.require('Ext.data.Store');
24 Ext.onReady(function() {
25 userStore = Ext.create('Ext.data.Store', {
29 sorters: ['name', 'id'], // sort first by name, then by id
31 // filter the data to only include users with the name 'Ed'
40 url: 'data/users.json',
44 successProperty: 'success'