1 <div class="body-wrap" xmlns:ext="http://www.extjs.com"><div class="top-tools"><a class="inner-link" href="#Ext.ux.grid.filter.StringFilter-props"><img src="resources/images/default/s.gif" class="item-icon icon-prop">Properties</a> <a class="inner-link" href="#Ext.ux.grid.filter.StringFilter-methods"><img src="resources/images/default/s.gif" class="item-icon icon-method">Methods</a> <a class="inner-link" href="#Ext.ux.grid.filter.StringFilter-events"><img src="resources/images/default/s.gif" class="item-icon icon-event">Events</a> <a class="inner-link" href="#Ext.ux.grid.filter.StringFilter-configs"><img src="resources/images/default/s.gif" class="item-icon icon-config">Config Options</a> <a class="bookmark" href="../docs/?class=Ext.ux.grid.filter.StringFilter"><img src="resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a> </div><div class="inheritance res-block"><pre class="res-block-inner"><a href="output/Ext.ux.grid.filter.Filter.html" ext:member="" ext:cls="Ext.ux.grid.filter.Filter">Filter</a>
2 <img src="resources/elbow-end.gif">StringFilter</pre></div><h1>Class <a href="source/StringFilter.html#cls-Ext.ux.grid.filter.StringFilter">Ext.ux.grid.filter.StringFilter</a></h1><table cellspacing="0"><tr><td class="label">Package:</td><td class="hd-info">Ext.ux.grid.filter</td></tr><tr><td class="label">Defined In:</td><td class="hd-info"><a href="source/StringFilter.html#cls-Ext.ux.grid.filter.StringFilter">StringFilter.js</a></td></tr><tr><td class="label">Class:</td><td class="hd-info"><a href="source/StringFilter.html#cls-Ext.ux.grid.filter.StringFilter">StringFilter</a></td></tr><tr><td class="label">Extends:</td><td class="hd-info"><a href="output/Ext.ux.grid.filter.Filter.html" ext:cls="Ext.ux.grid.filter.Filter" ext:member="">Filter</a></td></tr></table><div class="description">Filter by a configurable Ext.form.TextField
3 <p><b><u>Example Usage:</u></b></p>
4 <pre><code><b>var</b> filters = <b>new</b> Ext.ux.grid.GridFilters({
7 <i>// required configs</i>
8 type: <em>'string'</em>,
9 dataIndex: <em>'name'</em>,
11 <i>// optional configs</i>
12 value: <em>'foo'</em>,
13 active: true, <i>// <b>default</b> is false</i>
14 iconCls: <em>'ux-gridfilter-text-icon'</em> <i>// <b>default</b></i>
15 <i>// any Ext.form.TextField configs accepted</i>
17 });</code></pre></div><div class="hr"></div><a id="Ext.ux.grid.filter.StringFilter-configs"></a><h2>Config Options</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Config Options</th><th class="msource-header">Defined By</th></tr><tr class="config-row inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.ux.grid.filter.Filter-active"></a><b><a href="source/Filter.html#cfg-Ext.ux.grid.filter.Filter-active">active</a></b> : Boolean<div class="mdesc">Indicates the initial status of the filter (defaults to false).</div></td><td class="msource"><a href="output/Ext.ux.grid.filter.Filter.html#active" ext:member="#active" ext:cls="Ext.ux.grid.filter.Filter">Filter</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.ux.grid.filter.Filter-dataIndex"></a><b><a href="source/Filter.html#cfg-Ext.ux.grid.filter.Filter-dataIndex">dataIndex</a></b> : String<div class="mdesc"><div class="short">The Ext.data.Store dataIndex of the field this filter represents.
18 The dataIndex does not actually have to exist in th...</div><div class="long">The <a href="output/Ext.data.Store.html" ext:cls="Ext.data.Store">Ext.data.Store</a> dataIndex of the field this filter represents.
19 The dataIndex does not actually have to exist in the store.</div></div></td><td class="msource"><a href="output/Ext.ux.grid.filter.Filter.html#dataIndex" ext:member="#dataIndex" ext:cls="Ext.ux.grid.filter.Filter">Filter</a></td></tr><tr class="config-row "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.ux.grid.filter.StringFilter-iconCls"></a><b><a href="source/StringFilter.html#cfg-Ext.ux.grid.filter.StringFilter-iconCls">iconCls</a></b> : String<div class="mdesc">The iconCls to be applied to the menu item.
20 Defaults to <tt>'ux-gridfilter-text-icon'</tt>.</div></td><td class="msource">StringFilter</td></tr><tr class="config-row "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.ux.grid.filter.StringFilter-iconCls"></a><b><a href="source/ux-all-debug.html#cfg-Ext.ux.grid.filter.StringFilter-iconCls">iconCls</a></b> : String<div class="mdesc">The iconCls to be applied to the menu item.
21 Defaults to <tt>'ux-gridfilter-text-icon'</tt>.</div></td><td class="msource">StringFilter</td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.ux.grid.filter.Filter-updateBuffer"></a><b><a href="source/Filter.html#cfg-Ext.ux.grid.filter.Filter-updateBuffer">updateBuffer</a></b> : Number<div class="mdesc"><div class="short">Number of milliseconds to wait after user interaction to fire an update. Only supported
22 by filters: 'list', 'numeric...</div><div class="long">Number of milliseconds to wait after user interaction to fire an update. Only supported
23 by filters: 'list', 'numeric', and 'string'. Defaults to 500.</div></div></td><td class="msource"><a href="output/Ext.ux.grid.filter.Filter.html#updateBuffer" ext:member="#updateBuffer" ext:cls="Ext.ux.grid.filter.Filter">Filter</a></td></tr></tbody></table><a id="Ext.ux.grid.filter.StringFilter-props"></a><h2>Public Properties</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Property</th><th class="msource-header">Defined By</th></tr><tr class="property-row inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.ux.grid.filter.Filter-active"></a><b><a href="source/Filter.html#prop-Ext.ux.grid.filter.Filter-active">active</a></b> : Boolean<div class="mdesc">True if this filter is active. Use setActive() to alter after configuration.</div></td><td class="msource"><a href="output/Ext.ux.grid.filter.Filter.html#active" ext:member="#active" ext:cls="Ext.ux.grid.filter.Filter">Filter</a></td></tr><tr class="property-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.ux.grid.filter.Filter-getSerialArgs"></a><b><a href="source/Filter.html#prop-Ext.ux.grid.filter.Filter-getSerialArgs">getSerialArgs</a></b> : Object<div class="mdesc"><div class="short">Template method to be implemented by all subclasses that is to
24 get and return serialized filter data for transmission...</div><div class="long">Template method to be implemented by all subclasses that is to
25 get and return serialized filter data for transmission to the server.
26 Defaults to Ext.emptyFn.</div></div></td><td class="msource"><a href="output/Ext.ux.grid.filter.Filter.html#getSerialArgs" ext:member="#getSerialArgs" ext:cls="Ext.ux.grid.filter.Filter">Filter</a></td></tr><tr class="property-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.ux.grid.filter.Filter-init"></a><b><a href="source/Filter.html#prop-Ext.ux.grid.filter.Filter-init">init</a></b> : Object<div class="mdesc"><div class="short">Template method to be implemented by all subclasses that is to
27 initialize the filter and install required menu items....</div><div class="long">Template method to be implemented by all subclasses that is to
28 initialize the filter and install required menu items.
29 Defaults to Ext.emptyFn.</div></div></td><td class="msource"><a href="output/Ext.ux.grid.filter.Filter.html#init" ext:member="#init" ext:cls="Ext.ux.grid.filter.Filter">Filter</a></td></tr><tr class="property-row inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.ux.grid.filter.Filter-menu"></a><b><a href="source/Filter.html#prop-Ext.ux.grid.filter.Filter-menu">menu</a></b> : Ext.menu.Menu<div class="mdesc">The filter configuration menu that will be installed into the filter submenu of a column menu.</div></td><td class="msource"><a href="output/Ext.ux.grid.filter.Filter.html#menu" ext:member="#menu" ext:cls="Ext.ux.grid.filter.Filter">Filter</a></td></tr></tbody></table><a id="Ext.ux.grid.filter.StringFilter-methods"></a><h2>Public Methods</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Method</th><th class="msource-header">Defined By</th></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.ux.grid.filter.Filter-destroy"></a><b><a href="source/ux-all-debug.html#method-Ext.ux.grid.filter.Filter-destroy">destroy</a></b>()
31 void<div class="mdesc"><div class="short">Destroys this filter by purging any event listeners, and removing any menus.</div><div class="long">Destroys this filter by purging any event listeners, and removing any menus.<div class="mdetail-params"><strong>Parameters:</strong><ul><li>None.</li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource"><a href="output/Ext.ux.grid.filter.Filter.html#destroy" ext:member="#destroy" ext:cls="Ext.ux.grid.filter.Filter">Filter</a></td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.ux.grid.filter.Filter-getValue"></a><b><a href="source/ux-all-debug.html#method-Ext.ux.grid.filter.Filter-getValue">getValue</a></b>()
33 Object<div class="mdesc"><div class="short">Template method to be implemented by all subclasses that is to
34 get and return the value of the filter.
35 Defaults to Ex...</div><div class="long">Template method to be implemented by all subclasses that is to
36 get and return the value of the filter.
37 Defaults to Ext.emptyFn.<div class="mdetail-params"><strong>Parameters:</strong><ul><li>None.</li></ul><strong>Returns:</strong><ul><li><code>Object</code><div class="sub-desc">The 'serialized' form of this filter</div></li></ul></div></div></div></td><td class="msource"><a href="output/Ext.ux.grid.filter.Filter.html#getValue" ext:member="#getValue" ext:cls="Ext.ux.grid.filter.Filter">Filter</a></td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.ux.grid.filter.Filter-isActivatable"></a><b><a href="source/ux-all-debug.html#method-Ext.ux.grid.filter.Filter-isActivatable">isActivatable</a></b>()
39 Boolean<div class="mdesc"><div class="short">Template method to be implemented by all subclasses that is to
40 return true if the filter has enough configuration inf...</div><div class="long">Template method to be implemented by all subclasses that is to
41 return <tt>true</tt> if the filter has enough configuration information to be activated.
42 Defaults to <tt>return true</tt>.<div class="mdetail-params"><strong>Parameters:</strong><ul><li>None.</li></ul><strong>Returns:</strong><ul><li><code>Boolean</code><div class="sub-desc"></div></li></ul></div></div></div></td><td class="msource"><a href="output/Ext.ux.grid.filter.Filter.html#isActivatable" ext:member="#isActivatable" ext:cls="Ext.ux.grid.filter.Filter">Filter</a></td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.ux.grid.filter.Filter-serialize"></a><b><a href="source/ux-all-debug.html#method-Ext.ux.grid.filter.Filter-serialize">serialize</a></b>()
44 Object/Array<div class="mdesc"><div class="short">Returns the serialized filter data for transmission to the server
45 and fires the 'serialize' event.</div><div class="long">Returns the serialized filter data for transmission to the server
46 and fires the 'serialize' event.<div class="mdetail-params"><strong>Parameters:</strong><ul><li>None.</li></ul><strong>Returns:</strong><ul><li><code>Object/Array</code><div class="sub-desc">An object or collection of objects containing
47 key value pairs representing the current configuration of the filter.</div></li></ul></div></div></div></td><td class="msource"><a href="output/Ext.ux.grid.filter.Filter.html#serialize" ext:member="#serialize" ext:cls="Ext.ux.grid.filter.Filter">Filter</a></td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.ux.grid.filter.Filter-setActive"></a><b><a href="source/ux-all-debug.html#method-Ext.ux.grid.filter.Filter-setActive">setActive</a></b>( <code>Boolean active</code>, <code>Boolean suppressEvent</code> )
49 void<div class="mdesc"><div class="short">Sets the status of the filter and fires the appropriate events.</div><div class="long">Sets the status of the filter and fires the appropriate events.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>active</code> : Boolean<div class="sub-desc">The new filter state.</div></li><li><code>suppressEvent</code> : Boolean<div class="sub-desc">True to prevent events from being fired.</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource"><a href="output/Ext.ux.grid.filter.Filter.html#setActive" ext:member="#setActive" ext:cls="Ext.ux.grid.filter.Filter">Filter</a></td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.ux.grid.filter.Filter-setValue"></a><b><a href="source/ux-all-debug.html#method-Ext.ux.grid.filter.Filter-setValue">setValue</a></b>( <code>Object data</code> )
51 void<div class="mdesc"><div class="short">Template method to be implemented by all subclasses that is to
52 set the value of the filter and fire the 'update' even...</div><div class="long">Template method to be implemented by all subclasses that is to
53 set the value of the filter and fire the 'update' event.
54 Defaults to Ext.emptyFn.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>data</code> : Object<div class="sub-desc">The value to set the filter</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource"><a href="output/Ext.ux.grid.filter.Filter.html#setValue" ext:member="#setValue" ext:cls="Ext.ux.grid.filter.Filter">Filter</a></td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.ux.grid.filter.StringFilter-validateRecord"></a><b><a href="source/ux-all-debug.html#method-Ext.ux.grid.filter.StringFilter-validateRecord">validateRecord</a></b>( <code>Ext.data.Record record</code> )
56 Boolean<div class="mdesc"><div class="short">Template method that is to validate the provided Ext.data.Record
57 against the filters configuration.</div><div class="long">Template method that is to validate the provided Ext.data.Record
58 against the filters configuration.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>record</code> : Ext.data.Record<div class="sub-desc">The record to validate</div></li></ul><strong>Returns:</strong><ul><li><code>Boolean</code><div class="sub-desc">true if the record is valid within the bounds
59 of the filter, false otherwise.</div></li></ul></div></div></div></td><td class="msource">StringFilter</td></tr></tbody></table><a id="Ext.ux.grid.filter.StringFilter-events"></a><h2>Public Events</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Event</th><th class="msource-header">Defined By</th></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.ux.grid.filter.Filter-activate"></a><b><a href="source/Filter.html#event-Ext.ux.grid.filter.Filter-activate">activate</a></b> :
60 ( <code>Ext.ux.grid.filter.Filter this</code> )
61 <div class="mdesc"><div class="short">Fires when an inactive filter becomes active</div><div class="long">Fires when an inactive filter becomes active<div class="mdetail-params"><strong style="font-weight: normal;">Listeners will be called with the following arguments:</strong><ul><li><code>this</code> : Ext.ux.grid.filter.Filter<div class="sub-desc"></div></li></ul></div></div></div></td><td class="msource"><a href="output/Ext.ux.grid.filter.Filter.html#activate" ext:member="#activate" ext:cls="Ext.ux.grid.filter.Filter">Filter</a></td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.ux.grid.filter.Filter-deactivate"></a><b><a href="source/Filter.html#event-Ext.ux.grid.filter.Filter-deactivate">deactivate</a></b> :
62 ( <code>Ext.ux.grid.filter.Filter this</code> )
63 <div class="mdesc"><div class="short">Fires when an active filter becomes inactive</div><div class="long">Fires when an active filter becomes inactive<div class="mdetail-params"><strong style="font-weight: normal;">Listeners will be called with the following arguments:</strong><ul><li><code>this</code> : Ext.ux.grid.filter.Filter<div class="sub-desc"></div></li></ul></div></div></div></td><td class="msource"><a href="output/Ext.ux.grid.filter.Filter.html#deactivate" ext:member="#deactivate" ext:cls="Ext.ux.grid.filter.Filter">Filter</a></td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.ux.grid.filter.Filter-serialize"></a><b><a href="source/Filter.html#event-Ext.ux.grid.filter.Filter-serialize">serialize</a></b> :
64 ( <code>Array/Object data</code>, <code>Ext.ux.grid.filter.Filter filter</code> )
65 <div class="mdesc"><div class="short">Fires after the serialization process. Use this to attach additional parameters to serialization
66 data before it is en...</div><div class="long">Fires after the serialization process. Use this to attach additional parameters to serialization
67 data before it is encoded and sent to the server.<div class="mdetail-params"><strong style="font-weight: normal;">Listeners will be called with the following arguments:</strong><ul><li><code>data</code> : Array/Object<div class="sub-desc">A map or collection of maps representing the current filter configuration.</div></li><li><code>filter</code> : Ext.ux.grid.filter.Filter<div class="sub-desc">The filter being serialized.</div></li></ul></div></div></div></td><td class="msource"><a href="output/Ext.ux.grid.filter.Filter.html#serialize" ext:member="#serialize" ext:cls="Ext.ux.grid.filter.Filter">Filter</a></td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.ux.grid.filter.Filter-update"></a><b><a href="source/Filter.html#event-Ext.ux.grid.filter.Filter-update">update</a></b> :
68 ( <code>Ext.ux.grid.filter.Filter this</code> )
69 <div class="mdesc"><div class="short">Fires when a filter configuration has changed</div><div class="long">Fires when a filter configuration has changed<div class="mdetail-params"><strong style="font-weight: normal;">Listeners will be called with the following arguments:</strong><ul><li><code>this</code> : Ext.ux.grid.filter.Filter<div class="sub-desc">The filter object.</div></li></ul></div></div></div></td><td class="msource"><a href="output/Ext.ux.grid.filter.Filter.html#update" ext:member="#update" ext:cls="Ext.ux.grid.filter.Filter">Filter</a></td></tr></tbody></table></div>