Upgrade to ExtJS 4.0.1 - Released 05/18/2011
[extjs.git] / docs / output / Ext.util.Filter.js
1 Ext.data.JsonP.Ext_util_Filter({
2   "tagname": "class",
3   "name": "Ext.util.Filter",
4   "doc": "<p>Represents a filter that can be applied to a <a href=\"#/api/Ext.util.MixedCollection\" rel=\"Ext.util.MixedCollection\" class=\"docClass\">MixedCollection</a>. Can either simply\nfilter on a property/value pair or pass in a filter function with custom logic. Filters are always used in the context\nof MixedCollections, though <a href=\"#/api/Ext.data.Store\" rel=\"Ext.data.Store\" class=\"docClass\">Store</a>s frequently create them when filtering and searching on their\nrecords. Example usage:</p>\n\n\n<pre><code>//set up a fictional MixedCollection containing a few people to filter on\nvar allNames = new Ext.util.MixedCollection();\nallNames.addAll([\n    {id: 1, name: 'Ed',    age: 25},\n    {id: 2, name: 'Jamie', age: 37},\n    {id: 3, name: 'Abe',   age: 32},\n    {id: 4, name: 'Aaron', age: 26},\n    {id: 5, name: 'David', age: 32}\n]);\n\nvar ageFilter = new Ext.util.Filter({\n    property: 'age',\n    value   : 32\n});\n\nvar longNameFilter = new Ext.util.Filter({\n    filterFn: function(item) {\n        return item.name.length > 4;\n    }\n});\n\n//a new MixedCollection with the 3 names longer than 4 characters\nvar longNames = allNames.filter(longNameFilter);\n\n//a new MixedCollection with the 2 people of age 24:\nvar youngFolk = allNames.filter(ageFilter);\n</code></pre>\n\n",
5   "extends": "Object",
6   "mixins": [
7
8   ],
9   "alternateClassNames": [
10
11   ],
12   "xtype": null,
13   "author": null,
14   "docauthor": null,
15   "singleton": false,
16   "private": false,
17   "cfg": [
18     {
19       "tagname": "cfg",
20       "name": "anyMatch",
21       "member": "Ext.util.Filter",
22       "type": "Boolean",
23       "doc": "<p>True to allow any match - no regex start/end line anchors will be added. Defaults to false</p>\n",
24       "private": false,
25       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Filter.js",
26       "linenr": 53,
27       "html_filename": "Filter.html",
28       "href": "Filter.html#Ext-util-Filter-cfg-anyMatch"
29     },
30     {
31       "tagname": "cfg",
32       "name": "caseSensitive",
33       "member": "Ext.util.Filter",
34       "type": "Boolean",
35       "doc": "<p>True to make the regex case sensitive (adds 'i' switch to regex). Defaults to false.</p>\n",
36       "private": false,
37       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Filter.js",
38       "linenr": 64,
39       "html_filename": "Filter.html",
40       "href": "Filter.html#Ext-util-Filter-cfg-caseSensitive"
41     },
42     {
43       "tagname": "cfg",
44       "name": "exactMatch",
45       "member": "Ext.util.Filter",
46       "type": "Boolean",
47       "doc": "<p>True to force exact match (^ and $ characters added to the regex). Defaults to false.\nIgnored if anyMatch is true.</p>\n",
48       "private": false,
49       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Filter.js",
50       "linenr": 58,
51       "html_filename": "Filter.html",
52       "href": "Filter.html#Ext-util-Filter-cfg-exactMatch"
53     },
54     {
55       "tagname": "cfg",
56       "name": "filterFn",
57       "member": "Ext.util.Filter",
58       "type": "Function",
59       "doc": "<p>A custom filter function which is passed each item in the <a href=\"#/api/Ext.util.MixedCollection\" rel=\"Ext.util.MixedCollection\" class=\"docClass\">Ext.util.MixedCollection</a>\nin turn. Should return true to accept each item or false to reject it</p>\n",
60       "private": false,
61       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Filter.js",
62       "linenr": 48,
63       "html_filename": "Filter.html",
64       "href": "Filter.html#Ext-util-Filter-cfg-filterFn",
65       "shortDoc": "A custom filter function which is passed each item in the Ext.util.MixedCollection\nin turn. Should return true to acc..."
66     },
67     {
68       "tagname": "cfg",
69       "name": "property",
70       "member": "Ext.util.Filter",
71       "type": "String",
72       "doc": "<p>The property to filter on. Required unless a <a href=\"#/api/Ext.util.Filter--filter\" rel=\"Ext.util.Filter--filter\" class=\"docClass\">filter</a> is passed</p>\n",
73       "private": false,
74       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Filter.js",
75       "linenr": 44,
76       "html_filename": "Filter.html",
77       "href": "Filter.html#Ext-util-Filter-cfg-property"
78     },
79     {
80       "tagname": "cfg",
81       "name": "root",
82       "member": "Ext.util.Filter",
83       "type": "String",
84       "doc": "<p>Optional root property. This is mostly useful when filtering a Store, in which case we set the\nroot to 'data' to make the filter pull the <a href=\"#/api/Ext.util.Filter-cfg-property\" rel=\"Ext.util.Filter-cfg-property\" class=\"docClass\">property</a> out of the data object of each item</p>\n",
85       "private": false,
86       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Filter.js",
87       "linenr": 69,
88       "html_filename": "Filter.html",
89       "href": "Filter.html#Ext-util-Filter-cfg-root",
90       "shortDoc": "Optional root property. This is mostly useful when filtering a Store, in which case we set the\nroot to 'data' to make..."
91     }
92   ],
93   "method": [
94     {
95       "tagname": "method",
96       "name": "Filter",
97       "member": "Ext.util.Filter",
98       "doc": "\n",
99       "params": [
100         {
101           "type": "Object",
102           "name": "config",
103           "doc": "<p>Config object</p>\n",
104           "optional": false
105         }
106       ],
107       "return": {
108         "type": "void",
109         "doc": "\n"
110       },
111       "private": false,
112       "static": false,
113       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Filter.js",
114       "linenr": 1,
115       "html_filename": "Filter.html",
116       "href": "Filter.html#Ext-util-Filter-method-constructor",
117       "shortDoc": "\n"
118     }
119   ],
120   "property": [
121
122   ],
123   "event": [
124
125   ],
126   "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Filter.js",
127   "linenr": 1,
128   "html_filename": "Filter.html",
129   "href": "Filter.html#Ext-util-Filter",
130   "cssVar": [
131
132   ],
133   "cssMixin": [
134
135   ],
136   "component": false,
137   "superclasses": [
138
139   ],
140   "subclasses": [
141
142   ],
143   "mixedInto": [
144
145   ],
146   "allMixins": [
147
148   ]
149 });