Upgrade to ExtJS 4.0.1 - Released 05/18/2011
[extjs.git] / docs / output / Ext.state.Stateful.js
1 Ext.data.JsonP.Ext_state_Stateful({
2   "tagname": "class",
3   "name": "Ext.state.Stateful",
4   "doc": "<p>A mixin for being able to save the state of an object to an underlying\n<a href=\"#/api/Ext.state.Provider\" rel=\"Ext.state.Provider\" class=\"docClass\">Ext.state.Provider</a>.</p>\n",
5   "extends": null,
6   "mixins": [
7     "Ext.util.Observable"
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": "listeners",
21       "member": "Ext.util.Observable",
22       "type": "Object",
23       "doc": "<p>(optional) <p>A config object containing one or more event handlers to be added to this\nobject during initialization.  This should be a valid listeners config object as specified in the\n<a href=\"#/api/Ext.state.Stateful-method-addListener\" rel=\"Ext.state.Stateful-method-addListener\" class=\"docClass\">addListener</a> example for attaching multiple handlers at once.</p></p>\n\n<br><p><b><u>DOM events from ExtJs <a href=\"#/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Components</a></u></b></p>\n\n\n<br><p>While <i>some</i> ExtJs Component classes export selected DOM events (e.g. \"click\", \"mouseover\" etc), this\n\n\n<p>is usually only done when extra value can be added. For example the <a href=\"#/api/Ext.view.View\" rel=\"Ext.view.View\" class=\"docClass\">DataView</a>'s\n<b><code><a href=\"#/api/Ext.view.View--click\" rel=\"Ext.view.View--click\" class=\"docClass\">click</a></code></b> event passing the node clicked on. To access DOM\nevents directly from a child element of a Component, we need to specify the <code>element</code> option to\nidentify the Component property to add a DOM listener to:</p>\n\n<pre><code>new Ext.panel.Panel({\n    width: 400,\n    height: 200,\n    dockedItems: [{\n        xtype: 'toolbar'\n    }],\n    listeners: {\n        click: {\n            element: 'el', //bind to the underlying el property on the panel\n            fn: function(){ console.log('click el'); }\n        },\n        dblclick: {\n            element: 'body', //bind to the underlying body property on the panel\n            fn: function(){ console.log('dblclick body'); }\n        }\n    }\n});\n</code></pre>\n\n\n<p></p></p>\n",
24       "private": false,
25       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Observable.js",
26       "linenr": 103,
27       "html_filename": "Observable.html",
28       "href": "Observable.html#Ext-util-Observable-cfg-listeners",
29       "shortDoc": "(optional) A config object containing one or more event handlers to be added to this\nobject during initialization.  T..."
30     },
31     {
32       "tagname": "cfg",
33       "name": "saveBuffer",
34       "member": "Ext.state.Stateful",
35       "type": "Number",
36       "doc": "<p>A buffer to be applied if many state events are fired within\na short period. Defaults to 100.</p>\n",
37       "private": false,
38       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/state/Stateful.js",
39       "linenr": 74,
40       "html_filename": "Stateful.html",
41       "href": "Stateful.html#Ext-state-Stateful-cfg-saveBuffer"
42     },
43     {
44       "tagname": "cfg",
45       "name": "stateEvents",
46       "member": "Ext.state.Stateful",
47       "type": "Array",
48       "doc": "<p>An array of events that, when fired, should trigger this object to\nsave its state (defaults to none). <code>stateEvents</code> may be any type\nof event supported by this object, including browser or custom events\n(e.g., <tt>['click', 'customerchange']</tt>).</p>\n\n\n<p>See <code><a href=\"#/api/Ext.state.Stateful-cfg-stateful\" rel=\"Ext.state.Stateful-cfg-stateful\" class=\"docClass\">stateful</a></code> for an explanation of saving and\nrestoring object state.</p>\n\n",
49       "private": false,
50       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/state/Stateful.js",
51       "linenr": 64,
52       "html_filename": "Stateful.html",
53       "href": "Stateful.html#Ext-state-Stateful-cfg-stateEvents",
54       "shortDoc": "An array of events that, when fired, should trigger this object to\nsave its state (defaults to none). stateEvents may..."
55     },
56     {
57       "tagname": "cfg",
58       "name": "stateId",
59       "member": "Ext.state.Stateful",
60       "type": "String",
61       "doc": "<p>The unique id for this object to use for state management purposes.</p>\n\n<p>See <a href=\"#/api/Ext.state.Stateful-cfg-stateful\" rel=\"Ext.state.Stateful-cfg-stateful\" class=\"docClass\">stateful</a> for an explanation of saving and restoring state.</p>\n\n",
62       "private": false,
63       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/state/Stateful.js",
64       "linenr": 58,
65       "html_filename": "Stateful.html",
66       "href": "Stateful.html#Ext-state-Stateful-cfg-stateId",
67       "shortDoc": "The unique id for this object to use for state management purposes.\n\nSee stateful for an explanation of saving and re..."
68     },
69     {
70       "tagname": "cfg",
71       "name": "stateful",
72       "member": "Ext.state.Stateful",
73       "type": "Boolean",
74       "doc": "<p>A flag which causes the object to attempt to restore the state of\ninternal properties from a saved state on startup. The object must have\na <code><a href=\"#/api/Ext.state.Stateful-cfg-stateId\" rel=\"Ext.state.Stateful-cfg-stateId\" class=\"docClass\">stateId</a></code> for state to be managed. \nAuto-generated ids are not guaranteed to be stable across page loads and \ncannot be relied upon to save and restore the same state for a object.<p>\n<p>For state saving to work, the state manager's provider must have been\nset to an implementation of <a href=\"#/api/Ext.state.Provider\" rel=\"Ext.state.Provider\" class=\"docClass\">Ext.state.Provider</a> which overrides the\n<a href=\"#/api/Ext.state.Provider-method-set\" rel=\"Ext.state.Provider-method-set\" class=\"docClass\">set</a> and <a href=\"#/api/Ext.state.Provider-method-get\" rel=\"Ext.state.Provider-method-get\" class=\"docClass\">get</a>\nmethods to save and recall name/value pairs. A built-in implementation,\n<a href=\"#/api/Ext.state.CookieProvider\" rel=\"Ext.state.CookieProvider\" class=\"docClass\">Ext.state.CookieProvider</a> is available.</p>\n<p>To set the state provider for the current page:</p>\n<pre><code>Ext.state.Manager.setProvider(new Ext.state.CookieProvider({\n    expires: new Date(new Date().getTime()+(1000*60*60*24*7)), //7 days from now\n}));\n</code></pre>\n<p>A stateful object attempts to save state when one of the events\nlisted in the <code><a href=\"#/api/Ext.state.Stateful-cfg-stateEvents\" rel=\"Ext.state.Stateful-cfg-stateEvents\" class=\"docClass\">stateEvents</a></code> configuration fires.</p>\n<p>To save state, a stateful object first serializes its state by\ncalling <b><code><a href=\"#/api/Ext.state.Stateful-method-getState\" rel=\"Ext.state.Stateful-method-getState\" class=\"docClass\">getState</a></code></b>. By default, this function does\nnothing. The developer must provide an implementation which returns an\nobject hash which represents the restorable state of the object.</p>\n<p>The value yielded by getState is passed to <a href=\"#/api/Ext.state.Manager-method-set\" rel=\"Ext.state.Manager-method-set\" class=\"docClass\">Ext.state.Manager.set</a>\nwhich uses the configured <a href=\"#/api/Ext.state.Provider\" rel=\"Ext.state.Provider\" class=\"docClass\">Ext.state.Provider</a> to save the object\nkeyed by the <code><a href=\"#/api/stateId\" rel=\"stateId\" class=\"docClass\">stateId</a></code></p>.\n<p>During construction, a stateful object attempts to <i>restore</i>\nits state by calling <a href=\"#/api/Ext.state.Manager-method-get\" rel=\"Ext.state.Manager-method-get\" class=\"docClass\">Ext.state.Manager.get</a> passing the\n<code><a href=\"#/api/Ext.state.Stateful-cfg-stateId\" rel=\"Ext.state.Stateful-cfg-stateId\" class=\"docClass\">stateId</a></code></p>\n<p>The resulting object is passed to <b><code><a href=\"#/api/Ext.state.Stateful-method-applyState\" rel=\"Ext.state.Stateful-method-applyState\" class=\"docClass\">applyState</a></code></b>.\nThe default implementation of <code><a href=\"#/api/Ext.state.Stateful-method-applyState\" rel=\"Ext.state.Stateful-method-applyState\" class=\"docClass\">applyState</a></code> simply copies\nproperties into the object, but a developer may override this to support\nmore behaviour.</p>\n<p>You can perform extra processing on state save and restore by attaching\nhandlers to the <a href=\"#/api/Ext.state.Stateful-event-beforestaterestore\" rel=\"Ext.state.Stateful-event-beforestaterestore\" class=\"docClass\">beforestaterestore</a>, <a href=\"#/api/Ext.state.Stateful-event-staterestore\" rel=\"Ext.state.Stateful-event-staterestore\" class=\"docClass\">staterestore</a>,\n<a href=\"#/api/Ext.state.Stateful-event-beforestatesave\" rel=\"Ext.state.Stateful-event-beforestatesave\" class=\"docClass\">beforestatesave</a> and <a href=\"#/api/Ext.state.Stateful-event-statesave\" rel=\"Ext.state.Stateful-event-statesave\" class=\"docClass\">statesave</a> events.</p>\n\n",
75       "private": false,
76       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/state/Stateful.js",
77       "linenr": 18,
78       "html_filename": "Stateful.html",
79       "href": "Stateful.html#Ext-state-Stateful-cfg-stateful",
80       "shortDoc": "A flag which causes the object to attempt to restore the state of\ninternal properties from a saved state on startup. ..."
81     }
82   ],
83   "method": [
84     {
85       "tagname": "method",
86       "name": "addEvents",
87       "member": "Ext.util.Observable",
88       "doc": "<p>Adds the specified events to the list of events which this Observable may fire.</p>\n",
89       "params": [
90         {
91           "type": "Object/String",
92           "name": "o",
93           "doc": "<p>Either an object with event names as properties with a value of <code>true</code>\nor the first event name string if multiple event names are being passed as separate parameters.</p>\n",
94           "optional": false
95         },
96         {
97           "type": "String",
98           "name": "",
99           "doc": "<p>[additional] Optional additional event names if multiple event names are being passed as separate parameters.\nUsage:</p>\n\n<pre><code>this.addEvents('storeloaded', 'storecleared');\n</code></pre>\n\n",
100           "optional": false
101         }
102       ],
103       "return": {
104         "type": "void",
105         "doc": "\n"
106       },
107       "private": false,
108       "static": false,
109       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Observable.js",
110       "linenr": 452,
111       "html_filename": "Observable.html",
112       "href": "Observable.html#Ext-util-Observable-method-addEvents",
113       "shortDoc": "<p>Adds the specified events to the list of events which this Observable may fire.</p>\n"
114     },
115     {
116       "tagname": "method",
117       "name": "addListener",
118       "member": "Ext.util.Observable",
119       "doc": "<p>Appends an event handler to this object.</p>\n",
120       "params": [
121         {
122           "type": "String",
123           "name": "eventName",
124           "doc": "<p>The name of the event to listen for. May also be an object who's property names are event names. See</p>\n",
125           "optional": false
126         },
127         {
128           "type": "Function",
129           "name": "handler",
130           "doc": "<p>The method the event invokes.</p>\n",
131           "optional": false
132         },
133         {
134           "type": "Object",
135           "name": "scope",
136           "doc": "<p>(optional) The scope (<code><b>this</b></code> reference) in which the handler function is executed.\n<b>If omitted, defaults to the object which fired the event.</b></p>\n",
137           "optional": true
138         },
139         {
140           "type": "Object",
141           "name": "options",
142           "doc": "<p>(optional) An object containing handler configuration.\nproperties. This may contain any of the following properties:<ul>\n<li><b>scope</b> : Object<div class=\"sub-desc\">The scope (<code><b>this</b></code> reference) in which the handler function is executed.\n<b>If omitted, defaults to the object which fired the event.</b></div></li>\n<li><b>delay</b> : Number<div class=\"sub-desc\">The number of milliseconds to delay the invocation of the handler after the event fires.</div></li>\n<li><b>single</b> : Boolean<div class=\"sub-desc\">True to add a handler to handle just the next firing of the event, and then remove itself.</div></li>\n<li><b>buffer</b> : Number<div class=\"sub-desc\">Causes the handler to be scheduled to run in an <a href=\"#/api/Ext.util.DelayedTask\" rel=\"Ext.util.DelayedTask\" class=\"docClass\">Ext.util.DelayedTask</a> delayed\nby the specified number of milliseconds. If the event fires again within that time, the original\nhandler is <em>not</em> invoked, but the new handler is scheduled in its place.</div></li>\n<li><b>target</b> : Observable<div class=\"sub-desc\">Only call the handler if the event was fired on the target Observable, <i>not</i>\nif the event was bubbled up from a child Observable.</div></li>\n<li><b>element</b> : String<div class=\"sub-desc\"><b>This option is only valid for listeners bound to <a href=\"#/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Components</a>.</b>\nThe name of a Component property which references an element to add a listener to.</p>\n\n<p>This option is useful during Component construction to add DOM event listeners to elements of <a href=\"#/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Components</a> which\nwill exist only after the Component is rendered. For example, to add a click listener to a Panel's body:\n<pre><code>new Ext.panel.Panel({\n    title: 'The title',\n    listeners: {\n        click: this.handlePanelClick,\n        element: 'body'\n    }\n});\n</code></pre></p>\n\n\n<p>When added in this way, the options available are the options applicable to <a href=\"#/api/Ext.core.Element-method-addListener\" rel=\"Ext.core.Element-method-addListener\" class=\"docClass\">Ext.core.Element.addListener</a></p>\n\n\n<p></div></li>\n</ul><br></p>\n\n<p>\n<b>Combining Options</b><br>\nUsing the options argument, it is possible to combine different types of listeners:<br>\n<br>\nA delayed, one-time listener.\n<pre><code>myPanel.on('hide', this.handleClick, this, {\nsingle: true,\ndelay: 100\n});</code></pre>\n<p>\n<b>Attaching multiple handlers in 1 call</b><br>\nThe method also allows for a single argument to be passed which is a config object containing properties\nwhich specify multiple events. For example:\n<pre><code>myGridPanel.on({\n    cellClick: this.onCellClick,\n    mouseover: this.onMouseOver,\n    mouseout: this.onMouseOut,\n    scope: this // Important. Ensure \"this\" is correct during handler execution\n});\n</code></pre>.\n<p>\n\n",
143           "optional": true
144         }
145       ],
146       "return": {
147         "type": "void",
148         "doc": "\n"
149       },
150       "private": false,
151       "static": false,
152       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Observable.js",
153       "linenr": 271,
154       "html_filename": "Observable.html",
155       "href": "Observable.html#Ext-util-Observable-method-addListener",
156       "shortDoc": "<p>Appends an event handler to this object.</p>\n"
157     },
158     {
159       "tagname": "method",
160       "name": "addManagedListener",
161       "member": "Ext.util.Observable",
162       "doc": "<p>Adds listeners to any Observable object (or Element) which are automatically removed when this Component\nis destroyed.\n\n",
163       "params": [
164         {
165           "type": "Observable/Element",
166           "name": "item",
167           "doc": "<p>The item to which to add a listener/listeners.</p>\n",
168           "optional": false
169         },
170         {
171           "type": "Object/String",
172           "name": "ename",
173           "doc": "<p>The event name, or an object containing event name properties.</p>\n",
174           "optional": false
175         },
176         {
177           "type": "Function",
178           "name": "fn",
179           "doc": "<p>Optional. If the <code>ename</code> parameter was an event name, this\nis the handler function.</p>\n",
180           "optional": false
181         },
182         {
183           "type": "Object",
184           "name": "scope",
185           "doc": "<p>Optional. If the <code>ename</code> parameter was an event name, this\nis the scope (<code>this</code> reference) in which the handler function is executed.</p>\n",
186           "optional": false
187         },
188         {
189           "type": "Object",
190           "name": "opt",
191           "doc": "<p>Optional. If the <code>ename</code> parameter was an event name, this\nis the <a href=\"#/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">addListener</a> options.</p>\n",
192           "optional": false
193         }
194       ],
195       "return": {
196         "type": "void",
197         "doc": "\n"
198       },
199       "private": false,
200       "static": false,
201       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Observable.js",
202       "linenr": 155,
203       "html_filename": "Observable.html",
204       "href": "Observable.html#Ext-util-Observable-method-addManagedListener",
205       "shortDoc": "<p>Adds listeners to any Observable object (or Element) which are automatically removed when this Component\nis destroyed.\n\n"
206     },
207     {
208       "tagname": "method",
209       "name": "addStateEvents",
210       "member": "Ext.state.Stateful",
211       "doc": "<p>Add events that will trigger the state to be saved.</p>\n",
212       "params": [
213         {
214           "type": "String/Array",
215           "name": "events",
216           "doc": "<p>The event name or an array of event names.</p>\n",
217           "optional": false
218         }
219       ],
220       "return": {
221         "type": "void",
222         "doc": "\n"
223       },
224       "private": false,
225       "static": false,
226       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/state/Stateful.js",
227       "linenr": 159,
228       "html_filename": "Stateful.html",
229       "href": "Stateful.html#Ext-state-Stateful-method-addStateEvents",
230       "shortDoc": "<p>Add events that will trigger the state to be saved.</p>\n"
231     },
232     {
233       "tagname": "method",
234       "name": "applyState",
235       "member": "Ext.state.Stateful",
236       "doc": "<p>Applies the state to the object. This should be overridden in subclasses to do\nmore complex state operations. By default it applies the state properties onto\nthe current object.</p>\n",
237       "params": [
238         {
239           "type": "Object",
240           "name": "state",
241           "doc": "<p>The state</p>\n",
242           "optional": false
243         }
244       ],
245       "return": {
246         "type": "void",
247         "doc": "\n"
248       },
249       "private": false,
250       "static": false,
251       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/state/Stateful.js",
252       "linenr": 225,
253       "html_filename": "Stateful.html",
254       "href": "Stateful.html#Ext-state-Stateful-method-applyState",
255       "shortDoc": "Applies the state to the object. This should be overridden in subclasses to do\nmore complex state operations. By defa..."
256     },
257     {
258       "tagname": "method",
259       "name": "capture",
260       "member": "Ext.util.Observable",
261       "doc": "<p>Starts capture on the specified Observable. All events will be passed\nto the supplied function with the event name + standard signature of the event\n<b>before</b> the event is fired. If the supplied function returns false,\nthe event will not fire.</p>\n",
262       "params": [
263         {
264           "type": "Observable",
265           "name": "o",
266           "doc": "<p>The Observable to capture events from.</p>\n",
267           "optional": false
268         },
269         {
270           "type": "Function",
271           "name": "fn",
272           "doc": "<p>The function to call when an event is fired.</p>\n",
273           "optional": false
274         },
275         {
276           "type": "Object",
277           "name": "scope",
278           "doc": "<p>(optional) The scope (<code>this</code> reference) in which the function is executed. Defaults to the Observable firing the event.</p>\n",
279           "optional": true
280         }
281       ],
282       "return": {
283         "type": "void",
284         "doc": "\n"
285       },
286       "private": false,
287       "static": true,
288       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Observable.js",
289       "linenr": 55,
290       "html_filename": "Observable.html",
291       "href": "Observable.html#Ext-util-Observable-method-capture",
292       "shortDoc": "Starts capture on the specified Observable. All events will be passed\nto the supplied function with the event name + ..."
293     },
294     {
295       "tagname": "method",
296       "name": "clearListeners",
297       "member": "Ext.util.Observable",
298       "doc": "<p>Removes all listeners for this object including the managed listeners</p>\n",
299       "params": [
300
301       ],
302       "return": {
303         "type": "void",
304         "doc": "\n"
305       },
306       "private": false,
307       "static": false,
308       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Observable.js",
309       "linenr": 383,
310       "html_filename": "Observable.html",
311       "href": "Observable.html#Ext-util-Observable-method-clearListeners",
312       "shortDoc": "<p>Removes all listeners for this object including the managed listeners</p>\n"
313     },
314     {
315       "tagname": "method",
316       "name": "clearManagedListeners",
317       "member": "Ext.util.Observable",
318       "doc": "<p>Removes all managed listeners for this object.</p>\n",
319       "params": [
320
321       ],
322       "return": {
323         "type": "void",
324         "doc": "\n"
325       },
326       "private": false,
327       "static": false,
328       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Observable.js",
329       "linenr": 412,
330       "html_filename": "Observable.html",
331       "href": "Observable.html#Ext-util-Observable-method-clearManagedListeners",
332       "shortDoc": "<p>Removes all managed listeners for this object.</p>\n"
333     },
334     {
335       "tagname": "method",
336       "name": "destroy",
337       "member": "Ext.state.Stateful",
338       "doc": "<p>Destroys this stateful object.</p>\n",
339       "params": [
340
341       ],
342       "return": {
343         "type": "void",
344         "doc": "\n"
345       },
346       "private": false,
347       "static": false,
348       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/state/Stateful.js",
349       "linenr": 274,
350       "html_filename": "Stateful.html",
351       "href": "Stateful.html#Ext-state-Stateful-method-destroy",
352       "shortDoc": "<p>Destroys this stateful object.</p>\n"
353     },
354     {
355       "tagname": "method",
356       "name": "enableBubble",
357       "member": "Ext.util.Observable",
358       "doc": "<p>Enables events fired by this Observable to bubble up an owner hierarchy by calling\n<code>this.getBubbleTarget()</code> if present. There is no implementation in the Observable base class.</p>\n\n\n<p>This is commonly used by Ext.Components to bubble events to owner Containers. See <a href=\"#/api/Ext.Component-method-getBubbleTarget\" rel=\"Ext.Component-method-getBubbleTarget\" class=\"docClass\">Ext.Component.getBubbleTarget</a>. The default\nimplementation in <a href=\"#/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a> returns the Component's immediate owner. But if a known target is required, this can be overridden to\naccess the required target more quickly.</p>\n\n\n<p>Example:</p>\n\n\n<pre><code>Ext.override(Ext.form.field.Base, {\n//  Add functionality to Field&#39;s initComponent to enable the change event to bubble\ninitComponent : Ext.Function.createSequence(Ext.form.field.Base.prototype.initComponent, function() {\n    this.enableBubble('change');\n}),\n\n//  We know that we want Field&#39;s events to bubble directly to the FormPanel.\ngetBubbleTarget : function() {\n    if (!this.formPanel) {\n        this.formPanel = this.findParentByType('form');\n    }\n    return this.formPanel;\n}\n});\n\nvar myForm = new Ext.formPanel({\ntitle: 'User Details',\nitems: [{\n    ...\n}],\nlisteners: {\n    change: function() {\n        // Title goes red if form has been modified.\n        myForm.header.setStyle('color', 'red');\n    }\n}\n});\n</code></pre>\n\n",
359       "params": [
360         {
361           "type": "String/Array",
362           "name": "events",
363           "doc": "<p>The event name to bubble, or an Array of event names.</p>\n",
364           "optional": false
365         }
366       ],
367       "return": {
368         "type": "void",
369         "doc": "\n"
370       },
371       "private": false,
372       "static": false,
373       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Observable.js",
374       "linenr": 554,
375       "html_filename": "Observable.html",
376       "href": "Observable.html#Ext-util-Observable-method-enableBubble",
377       "shortDoc": "Enables events fired by this Observable to bubble up an owner hierarchy by calling\nthis.getBubbleTarget() if present...."
378     },
379     {
380       "tagname": "method",
381       "name": "fireEvent",
382       "member": "Ext.util.Observable",
383       "doc": "<p>Fires the specified event with the passed parameters (minus the event name).</p>\n\n\n<p>An event may be set to bubble up an Observable parent hierarchy (See <a href=\"#/api/Ext.Component-method-getBubbleTarget\" rel=\"Ext.Component-method-getBubbleTarget\" class=\"docClass\">Ext.Component.getBubbleTarget</a>)\nby calling <a href=\"#/api/Ext.state.Stateful-method-enableBubble\" rel=\"Ext.state.Stateful-method-enableBubble\" class=\"docClass\">enableBubble</a>.</p>\n\n",
384       "params": [
385         {
386           "type": "String",
387           "name": "eventName",
388           "doc": "<p>The name of the event to fire.</p>\n",
389           "optional": false
390         },
391         {
392           "type": "Object...",
393           "name": "args",
394           "doc": "<p>Variable number of parameters are passed to handlers.</p>\n",
395           "optional": false
396         }
397       ],
398       "return": {
399         "type": "Boolean",
400         "doc": "<p>returns false if any of the handlers return false otherwise it returns true.</p>\n"
401       },
402       "private": false,
403       "static": false,
404       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Observable.js",
405       "linenr": 232,
406       "html_filename": "Observable.html",
407       "href": "Observable.html#Ext-util-Observable-method-fireEvent",
408       "shortDoc": "Fires the specified event with the passed parameters (minus the event name).\n\n\nAn event may be set to bubble up an Ob..."
409     },
410     {
411       "tagname": "method",
412       "name": "getState",
413       "member": "Ext.state.Stateful",
414       "doc": "<p>Gets the current state of the object. By default this function returns null,\nit should be overridden in subclasses to implement methods for getting the state.</p>\n",
415       "params": [
416
417       ],
418       "return": {
419         "type": "Object",
420         "doc": "<p>The current state</p>\n"
421       },
422       "private": false,
423       "static": false,
424       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/state/Stateful.js",
425       "linenr": 216,
426       "html_filename": "Stateful.html",
427       "href": "Stateful.html#Ext-state-Stateful-method-getState",
428       "shortDoc": "Gets the current state of the object. By default this function returns null,\nit should be overridden in subclasses to..."
429     },
430     {
431       "tagname": "method",
432       "name": "getStateId",
433       "member": "Ext.state.Stateful",
434       "doc": "<p>Gets the state id for this object.</p>\n",
435       "params": [
436
437       ],
438       "return": {
439         "type": "String",
440         "doc": "<p>The state id, null if not found.</p>\n"
441       },
442       "private": false,
443       "static": false,
444       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/state/Stateful.js",
445       "linenr": 237,
446       "html_filename": "Stateful.html",
447       "href": "Stateful.html#Ext-state-Stateful-method-getStateId",
448       "shortDoc": "<p>Gets the state id for this object.</p>\n"
449     },
450     {
451       "tagname": "method",
452       "name": "hasListener",
453       "member": "Ext.util.Observable",
454       "doc": "<p>Checks to see if this object has any listeners for a specified event</p>\n",
455       "params": [
456         {
457           "type": "String",
458           "name": "eventName",
459           "doc": "<p>The name of the event to check for</p>\n",
460           "optional": false
461         }
462       ],
463       "return": {
464         "type": "Boolean",
465         "doc": "<p>True if the event is being listened for, else false</p>\n"
466       },
467       "private": false,
468       "static": false,
469       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Observable.js",
470       "linenr": 480,
471       "html_filename": "Observable.html",
472       "href": "Observable.html#Ext-util-Observable-method-hasListener",
473       "shortDoc": "<p>Checks to see if this object has any listeners for a specified event</p>\n"
474     },
475     {
476       "tagname": "method",
477       "name": "observe",
478       "member": "Ext.util.Observable",
479       "doc": "<p>Sets observability on the passed class constructor.</p>\n\n<p>This makes any event fired on any instance of the passed class also fire a single event through\nthe <strong>class</strong> allowing for central handling of events on many instances at once.</p>\n\n<p>Usage:</p>\n\n<pre><code>Ext.util.Observable.observe(Ext.data.Connection);\nExt.data.Connection.on('beforerequest', function(con, options) {\n    console.log('Ajax request made to ' + options.url);\n});\n</code></pre>\n",
480       "params": [
481         {
482           "type": "Function",
483           "name": "c",
484           "doc": "<p>The class constructor to make observable.</p>\n",
485           "optional": false
486         },
487         {
488           "type": "Object",
489           "name": "listeners",
490           "doc": "<p>An object containing a series of listeners to add. See <a href=\"#/api/Ext.state.Stateful-method-addListener\" rel=\"Ext.state.Stateful-method-addListener\" class=\"docClass\">addListener</a>.</p>\n",
491           "optional": false
492         }
493       ],
494       "return": {
495         "type": "void",
496         "doc": "\n"
497       },
498       "private": false,
499       "static": true,
500       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Observable.js",
501       "linenr": 69,
502       "html_filename": "Observable.html",
503       "href": "Observable.html#Ext-util-Observable-method-observe",
504       "shortDoc": "Sets observability on the passed class constructor.\n\nThis makes any event fired on any instance of the passed class a..."
505     },
506     {
507       "tagname": "method",
508       "name": "on",
509       "member": "Ext.util.Observable",
510       "doc": "<p>Appends an event handler to this object (shorthand for <a href=\"#/api/Ext.state.Stateful-method-addListener\" rel=\"Ext.state.Stateful-method-addListener\" class=\"docClass\">addListener</a>.)</p>\n",
511       "params": [
512         {
513           "type": "String",
514           "name": "eventName",
515           "doc": "<p>The type of event to listen for</p>\n",
516           "optional": false
517         },
518         {
519           "type": "Function",
520           "name": "handler",
521           "doc": "<p>The method the event invokes</p>\n",
522           "optional": false
523         },
524         {
525           "type": "Object",
526           "name": "scope",
527           "doc": "<p>(optional) The scope (<code><b>this</b></code> reference) in which the handler function is executed.\n<b>If omitted, defaults to the object which fired the event.</b></p>\n",
528           "optional": true
529         },
530         {
531           "type": "Object",
532           "name": "options",
533           "doc": "<p>(optional) An object containing handler configuration.</p>\n",
534           "optional": true
535         }
536       ],
537       "return": {
538         "type": "void",
539         "doc": "\n"
540       },
541       "private": false,
542       "static": false,
543       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Observable.js",
544       "linenr": 616,
545       "html_filename": "Observable.html",
546       "href": "Observable.html#Ext-util-Observable-method-on",
547       "shortDoc": "<p>Appends an event handler to this object (shorthand for <a href=\"#/api/Ext.state.Stateful-method-addListener\" rel=\"Ext.state.Stateful-method-addListener\" class=\"docClass\">addListener</a>.)</p>\n"
548     },
549     {
550       "tagname": "method",
551       "name": "relayEvents",
552       "member": "Ext.util.Observable",
553       "doc": "<p>Relays selected events from the specified Observable as if the events were fired by <code><b>this</b></code>.</p>\n",
554       "params": [
555         {
556           "type": "Object",
557           "name": "origin",
558           "doc": "<p>The Observable whose events this object is to relay.</p>\n",
559           "optional": false
560         },
561         {
562           "type": "Array",
563           "name": "events",
564           "doc": "<p>Array of event names to relay.</p>\n",
565           "optional": false
566         },
567         {
568           "type": "Object",
569           "name": "prefix",
570           "doc": "\n",
571           "optional": false
572         }
573       ],
574       "return": {
575         "type": "void",
576         "doc": "\n"
577       },
578       "private": false,
579       "static": false,
580       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Observable.js",
581       "linenr": 520,
582       "html_filename": "Observable.html",
583       "href": "Observable.html#Ext-util-Observable-method-relayEvents",
584       "shortDoc": "<p>Relays selected events from the specified Observable as if the events were fired by <code><b>this</b></code>.</p>\n"
585     },
586     {
587       "tagname": "method",
588       "name": "releaseCapture",
589       "member": "Ext.util.Observable",
590       "doc": "<p>Removes <b>all</b> added captures from the Observable.</p>\n",
591       "params": [
592         {
593           "type": "Observable",
594           "name": "o",
595           "doc": "<p>The Observable to release</p>\n",
596           "optional": false
597         }
598       ],
599       "return": {
600         "type": "void",
601         "doc": "\n"
602       },
603       "private": false,
604       "static": true,
605       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Observable.js",
606       "linenr": 46,
607       "html_filename": "Observable.html",
608       "href": "Observable.html#Ext-util-Observable-method-releaseCapture",
609       "shortDoc": "<p>Removes <b>all</b> added captures from the Observable.</p>\n"
610     },
611     {
612       "tagname": "method",
613       "name": "removeListener",
614       "member": "Ext.util.Observable",
615       "doc": "<p>Removes an event handler.</p>\n",
616       "params": [
617         {
618           "type": "String",
619           "name": "eventName",
620           "doc": "<p>The type of event the handler was associated with.</p>\n",
621           "optional": false
622         },
623         {
624           "type": "Function",
625           "name": "handler",
626           "doc": "<p>The handler to remove. <b>This must be a reference to the function passed into the <a href=\"#/api/Ext.state.Stateful-method-addListener\" rel=\"Ext.state.Stateful-method-addListener\" class=\"docClass\">addListener</a> call.</b></p>\n",
627           "optional": false
628         },
629         {
630           "type": "Object",
631           "name": "scope",
632           "doc": "<p>(optional) The scope originally specified for the handler.</p>\n",
633           "optional": true
634         }
635       ],
636       "return": {
637         "type": "void",
638         "doc": "\n"
639       },
640       "private": false,
641       "static": false,
642       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Observable.js",
643       "linenr": 352,
644       "html_filename": "Observable.html",
645       "href": "Observable.html#Ext-util-Observable-method-removeListener",
646       "shortDoc": "<p>Removes an event handler.</p>\n"
647     },
648     {
649       "tagname": "method",
650       "name": "removeManagedListener",
651       "member": "Ext.util.Observable",
652       "doc": "<p>Removes listeners that were added by the <a href=\"#/api/Ext.state.Stateful--mon\" rel=\"Ext.state.Stateful--mon\" class=\"docClass\">mon</a> method.</p>\n",
653       "params": [
654         {
655           "type": "Observable|Element",
656           "name": "item",
657           "doc": "<p>The item from which to remove a listener/listeners.</p>\n",
658           "optional": false
659         },
660         {
661           "type": "Object|String",
662           "name": "ename",
663           "doc": "<p>The event name, or an object containing event name properties.</p>\n",
664           "optional": false
665         },
666         {
667           "type": "Function",
668           "name": "fn",
669           "doc": "<p>Optional. If the <code>ename</code> parameter was an event name, this\nis the handler function.</p>\n",
670           "optional": false
671         },
672         {
673           "type": "Object",
674           "name": "scope",
675           "doc": "<p>Optional. If the <code>ename</code> parameter was an event name, this\nis the scope (<code>this</code> reference) in which the handler function is executed.</p>\n",
676           "optional": false
677         }
678       ],
679       "return": {
680         "type": "void",
681         "doc": "\n"
682       },
683       "private": false,
684       "static": false,
685       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Observable.js",
686       "linenr": 196,
687       "html_filename": "Observable.html",
688       "href": "Observable.html#Ext-util-Observable-method-removeManagedListener",
689       "shortDoc": "<p>Removes listeners that were added by the <a href=\"#/api/Ext.state.Stateful--mon\" rel=\"Ext.state.Stateful--mon\" class=\"docClass\">mon</a> method.</p>\n"
690     },
691     {
692       "tagname": "method",
693       "name": "resumeEvents",
694       "member": "Ext.util.Observable",
695       "doc": "<p>Resume firing events. (see <a href=\"#/api/Ext.state.Stateful-method-suspendEvents\" rel=\"Ext.state.Stateful-method-suspendEvents\" class=\"docClass\">suspendEvents</a>)\nIf events were suspended using the <code><b>queueSuspended</b></code> parameter, then all\nevents fired during event suspension will be sent to any listeners now.</p>\n",
696       "params": [
697
698       ],
699       "return": {
700         "type": "void",
701         "doc": "\n"
702       },
703       "private": false,
704       "static": false,
705       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Observable.js",
706       "linenr": 502,
707       "html_filename": "Observable.html",
708       "href": "Observable.html#Ext-util-Observable-method-resumeEvents",
709       "shortDoc": "Resume firing events. (see suspendEvents)\nIf events were suspended using the queueSuspended parameter, then all\nevent..."
710     },
711     {
712       "tagname": "method",
713       "name": "suspendEvents",
714       "member": "Ext.util.Observable",
715       "doc": "<p>Suspend the firing of all events. (see <a href=\"#/api/Ext.state.Stateful-method-resumeEvents\" rel=\"Ext.state.Stateful-method-resumeEvents\" class=\"docClass\">resumeEvents</a>)</p>\n",
716       "params": [
717         {
718           "type": "Boolean",
719           "name": "queueSuspended",
720           "doc": "<p>Pass as true to queue up suspended events to be fired\nafter the <a href=\"#/api/Ext.state.Stateful-method-resumeEvents\" rel=\"Ext.state.Stateful-method-resumeEvents\" class=\"docClass\">resumeEvents</a> call instead of discarding all suspended events;</p>\n",
721           "optional": false
722         }
723       ],
724       "return": {
725         "type": "void",
726         "doc": "\n"
727       },
728       "private": false,
729       "static": false,
730       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Observable.js",
731       "linenr": 490,
732       "html_filename": "Observable.html",
733       "href": "Observable.html#Ext-util-Observable-method-suspendEvents",
734       "shortDoc": "<p>Suspend the firing of all events. (see <a href=\"#/api/Ext.state.Stateful-method-resumeEvents\" rel=\"Ext.state.Stateful-method-resumeEvents\" class=\"docClass\">resumeEvents</a>)</p>\n"
735     },
736     {
737       "tagname": "method",
738       "name": "un",
739       "member": "Ext.util.Observable",
740       "doc": "<p>Removes an event handler (shorthand for <a href=\"#/api/Ext.state.Stateful-method-removeListener\" rel=\"Ext.state.Stateful-method-removeListener\" class=\"docClass\">removeListener</a>.)</p>\n",
741       "params": [
742         {
743           "type": "String",
744           "name": "eventName",
745           "doc": "<p>The type of event the handler was associated with.</p>\n",
746           "optional": false
747         },
748         {
749           "type": "Function",
750           "name": "handler",
751           "doc": "<p>The handler to remove. <b>This must be a reference to the function passed into the <a href=\"#/api/Ext.state.Stateful-method-addListener\" rel=\"Ext.state.Stateful-method-addListener\" class=\"docClass\">addListener</a> call.</b></p>\n",
752           "optional": false
753         },
754         {
755           "type": "Object",
756           "name": "scope",
757           "doc": "<p>(optional) The scope originally specified for the handler.</p>\n",
758           "optional": true
759         }
760       ],
761       "return": {
762         "type": "void",
763         "doc": "\n"
764       },
765       "private": false,
766       "static": false,
767       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Observable.js",
768       "linenr": 608,
769       "html_filename": "Observable.html",
770       "href": "Observable.html#Ext-util-Observable-method-un",
771       "shortDoc": "<p>Removes an event handler (shorthand for <a href=\"#/api/Ext.state.Stateful-method-removeListener\" rel=\"Ext.state.Stateful-method-removeListener\" class=\"docClass\">removeListener</a>.)</p>\n"
772     }
773   ],
774   "property": [
775
776   ],
777   "event": [
778     {
779       "tagname": "event",
780       "name": "beforestaterestore",
781       "member": "Ext.state.Stateful",
782       "doc": "<p>Fires before the state of the object is restored. Return false from an event handler to stop the restore.</p>\n",
783       "params": [
784         {
785           "type": "Ext.state.Stateful",
786           "name": "this",
787           "doc": "\n",
788           "optional": false
789         },
790         {
791           "type": "Object",
792           "name": "state",
793           "doc": "<p>The hash of state values returned from the StateProvider. If this\nevent is not vetoed, then the state object is passed to <b><tt>applyState</tt></b>. By default,\nthat simply copies property values into this object. The method maybe overriden to\nprovide custom state restoration.</p>\n",
794           "optional": false
795         }
796       ],
797       "private": false,
798       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/state/Stateful.js",
799       "linenr": 101,
800       "html_filename": "Stateful.html",
801       "href": "Stateful.html#Ext-state-Stateful-event-beforestaterestore",
802       "shortDoc": "<p>Fires before the state of the object is restored. Return false from an event handler to stop the restore.</p>\n"
803     },
804     {
805       "tagname": "event",
806       "name": "beforestatesave",
807       "member": "Ext.state.Stateful",
808       "doc": "<p>Fires before the state of the object is saved to the configured state provider. Return false to stop the save.</p>\n",
809       "params": [
810         {
811           "type": "Ext.state.Stateful",
812           "name": "this",
813           "doc": "\n",
814           "optional": false
815         },
816         {
817           "type": "Object",
818           "name": "state",
819           "doc": "<p>The hash of state values. This is determined by calling\n<b><tt>getState()</tt></b> on the object. This method must be provided by the\ndeveloper to return whetever representation of state is required, by default, <a href=\"#/api/Ext.state.Stateful\" rel=\"Ext.state.Stateful\" class=\"docClass\">Ext.state.Stateful</a>\nhas a null implementation.</p>\n",
820           "optional": false
821         }
822       ],
823       "private": false,
824       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/state/Stateful.js",
825       "linenr": 122,
826       "html_filename": "Stateful.html",
827       "href": "Stateful.html#Ext-state-Stateful-event-beforestatesave",
828       "shortDoc": "<p>Fires before the state of the object is saved to the configured state provider. Return false to stop the save.</p>\n"
829     },
830     {
831       "tagname": "event",
832       "name": "staterestore",
833       "member": "Ext.state.Stateful",
834       "doc": "<p>Fires after the state of the object is restored.</p>\n",
835       "params": [
836         {
837           "type": "Ext.state.Stateful",
838           "name": "this",
839           "doc": "\n",
840           "optional": false
841         },
842         {
843           "type": "Object",
844           "name": "state",
845           "doc": "<p>The hash of state values returned from the StateProvider. This is passed\nto <b><tt>applyState</tt></b>. By default, that simply copies property values into this\nobject. The method maybe overriden to provide custom state restoration.</p>\n",
846           "optional": false
847         }
848       ],
849       "private": false,
850       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/state/Stateful.js",
851       "linenr": 112,
852       "html_filename": "Stateful.html",
853       "href": "Stateful.html#Ext-state-Stateful-event-staterestore",
854       "shortDoc": "<p>Fires after the state of the object is restored.</p>\n"
855     },
856     {
857       "tagname": "event",
858       "name": "statesave",
859       "member": "Ext.state.Stateful",
860       "doc": "<p>Fires after the state of the object is saved to the configured state provider.</p>\n",
861       "params": [
862         {
863           "type": "Ext.state.Stateful",
864           "name": "this",
865           "doc": "\n",
866           "optional": false
867         },
868         {
869           "type": "Object",
870           "name": "state",
871           "doc": "<p>The hash of state values. This is determined by calling\n<b><tt>getState()</tt></b> on the object. This method must be provided by the\ndeveloper to return whetever representation of state is required, by default, <a href=\"#/api/Ext.state.Stateful\" rel=\"Ext.state.Stateful\" class=\"docClass\">Ext.state.Stateful</a>\nhas a null implementation.</p>\n",
872           "optional": false
873         }
874       ],
875       "private": false,
876       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/state/Stateful.js",
877       "linenr": 133,
878       "html_filename": "Stateful.html",
879       "href": "Stateful.html#Ext-state-Stateful-event-statesave",
880       "shortDoc": "<p>Fires after the state of the object is saved to the configured state provider.</p>\n"
881     }
882   ],
883   "filename": "/Users/nick/Projects/sencha/SDK/platform/src/state/Stateful.js",
884   "linenr": 1,
885   "html_filename": "Stateful.html",
886   "href": "Stateful.html#Ext-state-Stateful",
887   "cssVar": [
888
889   ],
890   "cssMixin": [
891
892   ],
893   "component": false,
894   "superclasses": [
895
896   ],
897   "subclasses": [
898
899   ],
900   "mixedInto": [
901     "Ext.AbstractComponent"
902   ],
903   "allMixins": [
904     "Ext.util.Observable"
905   ]
906 });