Upgrade to ExtJS 4.0.1 - Released 05/18/2011
[extjs.git] / docs / output / Ext.util.Sortable.js
1 Ext.data.JsonP.Ext_util_Sortable({
2   "tagname": "class",
3   "name": "Ext.util.Sortable",
4   "doc": "<p>A mixin which allows a data component to be sorted. This is used by e.g. <a href=\"#/api/Ext.data.Store\" rel=\"Ext.data.Store\" class=\"docClass\">Ext.data.Store</a> and <a href=\"#/api/Ext.data.TreeStore\" rel=\"Ext.data.TreeStore\" class=\"docClass\">Ext.data.TreeStore</a>.</p>\n\n<p>*NOTE**: This mixin is mainly for internal library use and most users should not need to use it directly. It\nis more likely you will want to use one of the component classes that import this mixin, such as\n<a href=\"#/api/Ext.data.Store\" rel=\"Ext.data.Store\" class=\"docClass\">Ext.data.Store</a> or <a href=\"#/api/Ext.data.TreeStore\" rel=\"Ext.data.TreeStore\" class=\"docClass\">Ext.data.TreeStore</a>.</p>\n",
5   "extends": null,
6   "mixins": [
7
8   ],
9   "alternateClassNames": [
10
11   ],
12   "xtype": null,
13   "author": null,
14   "docauthor": "Tommy Maintz <tommy@sencha.com>",
15   "singleton": false,
16   "private": false,
17   "cfg": [
18
19   ],
20   "method": [
21     {
22       "tagname": "method",
23       "name": "initSortable",
24       "member": "Ext.util.Sortable",
25       "doc": "<p>Performs initialization of this mixin. Component classes using this mixin should call this method\nduring their own initialization.</p>\n",
26       "params": [
27
28       ],
29       "return": {
30         "type": "void",
31         "doc": "\n"
32       },
33       "private": false,
34       "static": false,
35       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Sortable.js",
36       "linenr": 37,
37       "html_filename": "Sortable.html",
38       "href": "Sortable.html#Ext-util-Sortable-method-initSortable",
39       "shortDoc": "Performs initialization of this mixin. Component classes using this mixin should call this method\nduring their own in..."
40     },
41     {
42       "tagname": "method",
43       "name": "sort",
44       "member": "Ext.util.Sortable",
45       "doc": "<p>Sorts the data in the Store by one or more of its properties. Example usage:</p>\n\n\n<pre><code>//sort by a single field\nmyStore.sort('myField', 'DESC');\n\n//sorting by multiple fields\nmyStore.sort([\n    {\n        property : 'age',\n        direction: 'ASC'\n    },\n    {\n        property : 'name',\n        direction: 'DESC'\n    }\n]);\n</code></pre>\n\n\n<p>Internally, Store converts the passed arguments into an array of <a href=\"#/api/Ext.util.Sorter\" rel=\"Ext.util.Sorter\" class=\"docClass\">Ext.util.Sorter</a> instances, and delegates the actual\nsorting to its internal <a href=\"#/api/Ext.util.MixedCollection\" rel=\"Ext.util.MixedCollection\" class=\"docClass\">Ext.util.MixedCollection</a>.</p>\n\n\n<p>When passing a single string argument to sort, Store maintains a ASC/DESC toggler per field, so this code:</p>\n\n\n<pre><code>store.sort('myField');\nstore.sort('myField');\n     </code></pre>\n\n\n<p>Is equivalent to this code, because Store handles the toggling automatically:</p>\n\n\n<pre><code>store.sort('myField', 'ASC');\nstore.sort('myField', 'DESC');\n</code></pre>\n\n",
46       "params": [
47         {
48           "type": "String|Array",
49           "name": "sorters",
50           "doc": "<p>Either a string name of one of the fields in this Store's configured <a href=\"#/api/Ext.data.Model\" rel=\"Ext.data.Model\" class=\"docClass\">Model</a>,\nor an Array of sorter configurations.</p>\n",
51           "optional": false
52         },
53         {
54           "type": "String",
55           "name": "direction",
56           "doc": "<p>The overall direction to sort the data by. Defaults to \"ASC\".</p>\n",
57           "optional": false
58         },
59         {
60           "type": "Object",
61           "name": "where",
62           "doc": "\n",
63           "optional": false
64         },
65         {
66           "type": "Object",
67           "name": "doSort",
68           "doc": "\n",
69           "optional": false
70         }
71       ],
72       "return": {
73         "type": "void",
74         "doc": "\n"
75       },
76       "private": false,
77       "static": false,
78       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Sortable.js",
79       "linenr": 59,
80       "html_filename": "Sortable.html",
81       "href": "Sortable.html#Ext-util-Sortable-method-sort",
82       "shortDoc": "Sorts the data in the Store by one or more of its properties. Example usage:\n\n\n//sort by a single field\nmyStore.sort(..."
83     }
84   ],
85   "property": [
86     {
87       "tagname": "property",
88       "name": "defaultSortDirection",
89       "member": "Ext.util.Sortable",
90       "type": "String",
91       "doc": "<p>The default sort direction to use if one is not specified (defaults to \"ASC\")</p>\n",
92       "private": false,
93       "static": false,
94       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Sortable.js",
95       "linenr": 20,
96       "html_filename": "Sortable.html",
97       "href": "Sortable.html#Ext-util-Sortable-property-defaultSortDirection"
98     },
99     {
100       "tagname": "property",
101       "name": "isSortable",
102       "member": "Ext.util.Sortable",
103       "type": "Boolean",
104       "doc": "<p>Flag denoting that this object is sortable. Always true.</p>\n",
105       "private": false,
106       "static": false,
107       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Sortable.js",
108       "linenr": 13,
109       "html_filename": "Sortable.html",
110       "href": "Sortable.html#Ext-util-Sortable-property-isSortable"
111     },
112     {
113       "tagname": "property",
114       "name": "sortRoot",
115       "member": "Ext.util.Sortable",
116       "type": "String",
117       "doc": "<p>The property in each item that contains the data to sort. (defaults to null)</p>\n",
118       "private": false,
119       "static": false,
120       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Sortable.js",
121       "linenr": 31,
122       "html_filename": "Sortable.html",
123       "href": "Sortable.html#Ext-util-Sortable-property-sortRoot"
124     },
125     {
126       "tagname": "property",
127       "name": "sorters",
128       "member": "Ext.util.Sortable",
129       "type": "Ext.util.MixedCollection",
130       "doc": "<p>The collection of <a href=\"#/api/Ext.util.Sorter\" rel=\"Ext.util.Sorter\" class=\"docClass\">Sorters</a> currently applied to this Store</p>\n",
131       "private": false,
132       "static": false,
133       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Sortable.js",
134       "linenr": 45,
135       "html_filename": "Sortable.html",
136       "href": "Sortable.html#Ext-util-Sortable-property-sorters"
137     }
138   ],
139   "event": [
140
141   ],
142   "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Sortable.js",
143   "linenr": 1,
144   "html_filename": "Sortable.html",
145   "href": "Sortable.html#Ext-util-Sortable",
146   "cssVar": [
147
148   ],
149   "cssMixin": [
150
151   ],
152   "component": false,
153   "superclasses": [
154
155   ],
156   "subclasses": [
157
158   ],
159   "mixedInto": [
160     "Ext.data.AbstractStore",
161     "Ext.util.MixedCollection"
162   ],
163   "allMixins": [
164
165   ]
166 });