Upgrade to ExtJS 3.3.1 - Released 11/30/2010
[extjs.git] / docs / output / Ext.direct.JsonProvider.html
index 91757e7..ac0e28f 100644 (file)
@@ -1,16 +1,18 @@
-<div xmlns:ext="http://www.extjs.com" class="body-wrap"><div class="inheritance res-block"><pre class="res-block-inner"><a href="output/Ext.util.Observable.html" ext:member="" ext:cls="Ext.util.Observable">Observable</a>&#13;&nbsp;&nbsp;<img src="resources/elbow-end.gif"><a href="output/Ext.direct.Provider.html" ext:member="" ext:cls="Ext.direct.Provider">Provider</a>&#13;&nbsp;&nbsp;&nbsp;&nbsp;<img src="resources/elbow-end.gif">JsonProvider</pre></div><h1>Class <a href="source/JsonProvider.html#cls-Ext.direct.JsonProvider">Ext.direct.JsonProvider</a></h1><table cellspacing="0"><tr><td class="label">Package:</td><td class="hd-info">Ext.direct</td></tr><tr><td class="label">Defined In:</td><td class="hd-info">JsonProvider.js</td></tr><tr><td class="label">Class:</td><td class="hd-info"><a href="source/JsonProvider.html#cls-Ext.direct.JsonProvider">JsonProvider</a></td></tr><tr><td class="label">Subclasses:</td><td class="hd-info"><a href="output/Ext.direct.PollingProvider.html" ext:cls="Ext.direct.PollingProvider">PollingProvider</a>,&#13;<a href="output/Ext.direct.RemotingProvider.html" ext:cls="Ext.direct.RemotingProvider">RemotingProvider</a></td></tr><tr><td class="label">Extends:</td><td class="hd-info"><a href="output/Ext.direct.Provider.html" ext:cls="Ext.direct.Provider" ext:member="">Provider</a></td></tr></table><div class="description"></div><div class="hr"></div><a id="Ext.direct.JsonProvider-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 expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.direct.Provider-id"></a><b><a href="source/Provider.html#cfg-Ext.direct.Provider-id">id</a></b> : String<div class="mdesc"><div class="short">The unique id of the provider (defaults to an auto-assigned id).&#13;
-You should assign an id if you need to be able to a...</div><div class="long">The unique id of the provider (defaults to an <a href="output/Ext.html#Ext-id" ext:member="id" ext:cls="Ext">auto-assigned id</a>).\r
-You should assign an id if you need to be able to access the provider later and you do\r
-not have an object reference available, for example:\r
-<pre><code>Ext.Direct.addProvider(\r
-    {\r
-        type: <em>'polling'</em>,\r
-        url:  <em>'php/poll.php'</em>,\r
-        id:   <em>'poll-provider'</em>\r
-    }\r
-);\r
-     \r
-<b>var</b> p = <a href="output/Ext.Direct.html" ext:cls="Ext.Direct">Ext.Direct</a>.<a href="output/Ext.Direct.html#Ext.Direct-getProvider" ext:member="getProvider" ext:cls="Ext.Direct">getProvider</a>(<em>'poll-provider'</em>);\r
+<div class="body-wrap" xmlns:ext="http://www.extjs.com"><div class="top-tools"><a class="inner-link" href="#Ext.direct.JsonProvider-props"><img src="resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>&#13;<a class="inner-link" href="#Ext.direct.JsonProvider-methods"><img src="resources/images/default/s.gif" class="item-icon icon-method">Methods</a>&#13;<a class="inner-link" href="#Ext.direct.JsonProvider-events"><img src="resources/images/default/s.gif" class="item-icon icon-event">Events</a>&#13;<a class="inner-link" href="#Ext.direct.JsonProvider-configs"><img src="resources/images/default/s.gif" class="item-icon icon-config">Config Options</a>&#13;<a class="bookmark" href="../docs/?class=Ext.direct.JsonProvider"><img src="resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a>&#13;</div><div class="inheritance res-block"><pre class="res-block-inner"><a href="output/Ext.util.Observable.html" ext:member="" ext:cls="Ext.util.Observable">Observable</a>
+  <img src="resources/elbow-end.gif"><a href="output/Ext.direct.Provider.html" ext:member="" ext:cls="Ext.direct.Provider">Provider</a>
+    <img src="resources/elbow-end.gif">JsonProvider</pre></div><h1>Class <a href="source/JsonProvider.html#cls-Ext.direct.JsonProvider">Ext.direct.JsonProvider</a></h1><table cellspacing="0"><tr><td class="label">Package:</td><td class="hd-info">Ext.direct</td></tr><tr><td class="label">Defined In:</td><td class="hd-info"><a href="source/JsonProvider.html#cls-Ext.direct.JsonProvider">JsonProvider.js</a></td></tr><tr><td class="label">Class:</td><td class="hd-info"><a href="source/JsonProvider.html#cls-Ext.direct.JsonProvider">JsonProvider</a></td></tr><tr><td class="label">Subclasses:</td><td class="hd-info"><a href="output/Ext.direct.PollingProvider.html" ext:cls="Ext.direct.PollingProvider">PollingProvider</a>,&#13;<a href="output/Ext.direct.RemotingProvider.html" ext:cls="Ext.direct.RemotingProvider">RemotingProvider</a></td></tr><tr><td class="label">Extends:</td><td class="hd-info"><a href="output/Ext.direct.Provider.html" ext:cls="Ext.direct.Provider" ext:member="">Provider</a></td></tr></table><div class="description"></div><div class="hr"></div><a id="Ext.direct.JsonProvider-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 expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.direct.Provider-id"></a><b><a href="source/Provider.html#cfg-Ext.direct.Provider-id">id</a></b> : String<div class="mdesc"><div class="short">The unique id of the provider (defaults to an auto-assigned id).
+You should assign an id if you need to be able to ac...</div><div class="long">The unique id of the provider (defaults to an <a href="output/Ext.html#Ext-id" ext:member="id" ext:cls="Ext">auto-assigned id</a>).
+You should assign an id if you need to be able to access the provider later and you do
+not have an object reference available, for example:
+<pre><code>Ext.Direct.addProvider(
+    {
+        type: <em>'polling'</em>,
+        url:  <em>'php/poll.php'</em>,
+        id:   <em>'poll-provider'</em>
+    }
+);
+     
+<b>var</b> p = <a href="output/Ext.Direct.html" ext:cls="Ext.Direct">Ext.Direct</a>.<a href="output/Ext.Direct.html#Ext.Direct-getProvider" ext:member="getProvider" ext:cls="Ext.Direct">getProvider</a>(<em>'poll-provider'</em>);
 p.disconnect();</code></pre></div></div></td><td class="msource"><a href="output/Ext.direct.Provider.html#id" ext:member="#id" ext:cls="Ext.direct.Provider">Provider</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Observable-listeners"></a><b><a href="source/Observable.html#cfg-Ext.util.Observable-listeners">listeners</a></b> : Object<div class="mdesc"><div class="short">A config object containing one or more event handlers to be added to this
 object during initialization.  This should ...</div><div class="long"><p>A config object containing one or more event handlers to be added to this
 object during initialization.  This should be a valid listeners config object as specified in the
@@ -66,15 +68,15 @@ Ext.DomObserver = Ext.extend(Object, {
     typeAhead: true,
     mode: <em>'local'</em>,
     triggerAction: <em>'all'</em>
-});</code></pre></p></div></div></td><td class="msource"><a href="output/Ext.util.Observable.html#listeners" ext:member="#listeners" ext:cls="Ext.util.Observable">Observable</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.direct.Provider-priority"></a><b><a href="source/Provider.html#cfg-Ext.direct.Provider-priority">priority</a></b> : Number<div class="mdesc"><div class="short">Priority of the request. Lower is higher priority, 0 means "duplex" (always on).&#13;
-All Providers default to 1 except f...</div><div class="long">Priority of the request. Lower is higher priority, <tt>0</tt> means "duplex" (always on).\r
-All Providers default to <tt>1</tt> except for PollingProvider which defaults to <tt>3</tt>.</div></div></td><td class="msource"><a href="output/Ext.direct.Provider.html#priority" ext:member="#priority" ext:cls="Ext.direct.Provider">Provider</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.direct.Provider-type"></a><b><a href="source/Provider.html#cfg-Ext.direct.Provider-type">type</a></b> : String<div class="mdesc"><div class="short">Required, undefined by default.  The type of provider specified&#13;
-to Ext.Direct.addProvider to create a&#13;
-new Provider....</div><div class="long"><b>Required</b>, <tt>undefined</tt> by default.  The <tt>type</tt> of provider specified\r
-to <a href="output/Ext.Direct.html" ext:cls="Ext.Direct">Ext.Direct</a>.<a href="output/Ext.Direct.html#Ext.Direct-addProvider" ext:member="addProvider" ext:cls="Ext.Direct">addProvider</a> to create a\r
-new Provider. Acceptable values by default are:<div class="mdetail-params"><ul>\r
-<li><b><tt>polling</tt></b> : <a href="output/Ext.direct.PollingProvider.html" ext:cls="Ext.direct.PollingProvider">PollingProvider</a></li>\r
-<li><b><tt>remoting</tt></b> : <a href="output/Ext.direct.RemotingProvider.html" ext:cls="Ext.direct.RemotingProvider">RemotingProvider</a></li>\r
+});</code></pre></p></div></div></td><td class="msource"><a href="output/Ext.util.Observable.html#listeners" ext:member="#listeners" ext:cls="Ext.util.Observable">Observable</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.direct.Provider-priority"></a><b><a href="source/Provider.html#cfg-Ext.direct.Provider-priority">priority</a></b> : Number<div class="mdesc"><div class="short">Priority of the request. Lower is higher priority, 0 means "duplex" (always on).
+All Providers default to 1 except fo...</div><div class="long">Priority of the request. Lower is higher priority, <tt>0</tt> means "duplex" (always on).
+All Providers default to <tt>1</tt> except for PollingProvider which defaults to <tt>3</tt>.</div></div></td><td class="msource"><a href="output/Ext.direct.Provider.html#priority" ext:member="#priority" ext:cls="Ext.direct.Provider">Provider</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.direct.Provider-type"></a><b><a href="source/Provider.html#cfg-Ext.direct.Provider-type">type</a></b> : String<div class="mdesc"><div class="short">Required, undefined by default.  The type of provider specified
+to Ext.Direct.addProvider to create a
+new Provider. A...</div><div class="long"><b>Required</b>, <tt>undefined</tt> by default.  The <tt>type</tt> of provider specified
+to <a href="output/Ext.Direct.html" ext:cls="Ext.Direct">Ext.Direct</a>.<a href="output/Ext.Direct.html#Ext.Direct-addProvider" ext:member="addProvider" ext:cls="Ext.Direct">addProvider</a> to create a
+new Provider. Acceptable values by default are:<div class="mdetail-params"><ul>
+<li><b><tt>polling</tt></b> : <a href="output/Ext.direct.PollingProvider.html" ext:cls="Ext.direct.PollingProvider">PollingProvider</a></li>
+<li><b><tt>remoting</tt></b> : <a href="output/Ext.direct.RemotingProvider.html" ext:cls="Ext.direct.RemotingProvider">RemotingProvider</a></li>
 </ul></div></div></div></td><td class="msource"><a href="output/Ext.direct.Provider.html#type" ext:member="#type" ext:cls="Ext.direct.Provider">Provider</a></td></tr></tbody></table><a id="Ext.direct.JsonProvider-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">&nbsp;</a></td><td class="sig"><a id="Ext.direct.Provider-connect"></a><b><a href="source/Provider.html#prop-Ext.direct.Provider-connect">connect</a></b> : Object<div class="mdesc">Abstract methods for subclasses to implement.</div></td><td class="msource"><a href="output/Ext.direct.Provider.html#connect" ext:member="#connect" ext:cls="Ext.direct.Provider">Provider</a></td></tr><tr class="property-row  inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.direct.Provider-disconnect"></a><b><a href="source/Provider.html#prop-Ext.direct.Provider-disconnect">disconnect</a></b> : Object<div class="mdesc">Abstract methods for subclasses to implement.</div></td><td class="msource"><a href="output/Ext.direct.Provider.html#disconnect" ext:member="#disconnect" ext:cls="Ext.direct.Provider">Provider</a></td></tr></tbody></table><a id="Ext.direct.JsonProvider-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">&nbsp;</a></td><td class="sig"><a id="Ext.util.Observable-addEvents"></a><b><a href="source/Observable.html#method-Ext.util.Observable-addEvents">addEvents</a></b>(&nbsp;<code>Object|String&nbsp;o</code>,&nbsp;<code>string&nbsp;Optional.</code>&nbsp;)
     :
                                         void<div class="mdesc"><div class="short">Adds the specified events to the list of events which this Observable may fire.</div><div class="long">Adds the specified events to the list of events which this Observable may fire.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>o</code> : Object|String<div class="sub-desc">Either an object with event names as properties with a value of <code>true</code>
@@ -132,38 +134,38 @@ Or a shorthand syntax:<br>
  scope: this
 });</code></pre></div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource"><a href="output/Ext.util.Observable.html#addListener" ext:member="#addListener" ext:cls="Ext.util.Observable">Observable</a></td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Observable-enableBubble"></a><b><a href="source/Observable-more.html#method-Ext.util.Observable-enableBubble">enableBubble</a></b>(&nbsp;<code>String/Array&nbsp;events</code>&nbsp;)
     :
-                                        void<div class="mdesc"><div class="short">Enables events fired by this Observable to bubble up an owner hierarchy by calling&#13;
-this.getBubbleTarget() if present...</div><div class="long"><p>Enables events fired by this Observable to bubble up an owner hierarchy by calling\r
-<code>this.getBubbleTarget()</code> if present. There is no implementation in the Observable base class.</p>\r
-<p>This is commonly used by Ext.Components to bubble events to owner Containers. See <a href="output/Ext.Component.getBubbleTarget.html" ext:cls="Ext.Component.getBubbleTarget">Ext.Component.getBubbleTarget</a>. The default\r
-implementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to\r
-access the required target more quickly.</p>\r
-<p>Example:</p><pre><code>Ext.override(Ext.form.Field, {\r
-    <i>//  Add functionality to Field&#39;s initComponent to enable the change event to bubble\r</i>
-    initComponent : Ext.form.Field.prototype.initComponent.createSequence(<b>function</b>() {\r
-        this.enableBubble(<em>'change'</em>);\r
-    }),\r
-\r
-    <i>//  We know that we want Field&#39;s events to bubble directly to the FormPanel.\r</i>
-    getBubbleTarget : <b>function</b>() {\r
-        <b>if</b> (!this.formPanel) {\r
-            this.formPanel = this.findParentByType(<em>'form'</em>);\r
-        }\r
-        <b>return</b> this.formPanel;\r
-    }\r
-});\r
-\r
-<b>var</b> myForm = <b>new</b> Ext.formPanel({\r
-    title: <em>'User Details'</em>,\r
-    items: [{\r
-        ...\r
-    }],\r
-    listeners: {\r
-        change: <b>function</b>() {\r
-            <i>// Title goes red <b>if</b> form has been modified.\r</i>
-            myForm.header.setStyle(<em>'color'</em>, <em>'red'</em>);\r
-        }\r
-    }\r
+                                        void<div class="mdesc"><div class="short">Enables events fired by this Observable to bubble up an owner hierarchy by calling
+this.getBubbleTarget() if present....</div><div class="long"><p>Enables events fired by this Observable to bubble up an owner hierarchy by calling
+<code>this.getBubbleTarget()</code> if present. There is no implementation in the Observable base class.</p>
+<p>This is commonly used by Ext.Components to bubble events to owner Containers. See <a href="output/Ext.Component.getBubbleTarget.html" ext:cls="Ext.Component.getBubbleTarget">Ext.Component.getBubbleTarget</a>. The default
+implementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to
+access the required target more quickly.</p>
+<p>Example:</p><pre><code>Ext.override(Ext.form.Field, {
+    <i>//  Add functionality to Field&#39;s initComponent to enable the change event to bubble</i>
+    initComponent : Ext.form.Field.prototype.initComponent.createSequence(<b>function</b>() {
+        this.enableBubble(<em>'change'</em>);
+    }),
+
+    <i>//  We know that we want Field&#39;s events to bubble directly to the FormPanel.</i>
+    getBubbleTarget : <b>function</b>() {
+        <b>if</b> (!this.formPanel) {
+            this.formPanel = this.findParentByType(<em>'form'</em>);
+        }
+        <b>return</b> this.formPanel;
+    }
+});
+
+<b>var</b> myForm = <b>new</b> Ext.formPanel({
+    title: <em>'User Details'</em>,
+    items: [{
+        ...
+    }],
+    listeners: {
+        change: <b>function</b>() {
+            <i>// Title goes red <b>if</b> form has been modified.</i>
+            myForm.header.setStyle(<em>'color'</em>, <em>'red'</em>);
+        }
+    }
 });</code></pre><div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>events</code> : String/Array<div class="sub-desc">The event name to bubble, or an Array of event names.</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource"><a href="output/Ext.util.Observable.html#enableBubble" ext:member="#enableBubble" ext:cls="Ext.util.Observable">Observable</a></td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Observable-fireEvent"></a><b><a href="source/Observable.html#method-Ext.util.Observable-fireEvent">fireEvent</a></b>(&nbsp;<code>String&nbsp;eventName</code>,&nbsp;<code>Object...&nbsp;args</code>&nbsp;)
     :
                                         Boolean<div class="mdesc"><div class="short">Fires the specified event with the passed parameters (minus the event name).
@@ -173,8 +175,8 @@ by calling <a href="output/Ext.util.Observable.html#Ext.util.Observable-enableBu
     :
                                         Boolean<div class="mdesc"><div class="short">Checks to see if this object has any listeners for a specified event</div><div class="long">Checks to see if this object has any listeners for a specified event<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>eventName</code> : String<div class="sub-desc">The name of the event to check for</div></li></ul><strong>Returns:</strong><ul><li><code>Boolean</code><div class="sub-desc">True if the event is being listened for, else false</div></li></ul></div></div></div></td><td class="msource"><a href="output/Ext.util.Observable.html#hasListener" ext:member="#hasListener" ext:cls="Ext.util.Observable">Observable</a></td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.direct.Provider-isConnected"></a><b><a href="source/Provider.html#method-Ext.direct.Provider-isConnected">isConnected</a></b>()
     :
-                                        void<div class="mdesc"><div class="short">Returns whether or not the server-side is currently connected.&#13;
-Abstract method for subclasses to implement.</div><div class="long">Returns whether or not the server-side is currently connected.\r
+                                        void<div class="mdesc"><div class="short">Returns whether or not the server-side is currently connected.
+Abstract method for subclasses to implement.</div><div class="long">Returns whether or not the server-side is currently connected.
 Abstract method for subclasses to implement.<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.direct.Provider.html#isConnected" ext:member="#isConnected" ext:cls="Ext.direct.Provider">Provider</a></td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Observable-on"></a><b><a href="source/Observable.html#method-Ext.util.Observable-on">on</a></b>(&nbsp;<code>String&nbsp;eventName</code>,&nbsp;<code>Function&nbsp;handler</code>,&nbsp;<span title="Optional" class="optional">[<code>Object&nbsp;scope</code>]</span>,&nbsp;<span title="Optional" class="optional">[<code>Object&nbsp;options</code>]</span>&nbsp;)
     :
                                         void<div class="mdesc"><div class="short">Appends an event handler to this object (shorthand for addListener.)</div><div class="long">Appends an event handler to this object (shorthand for <a href="output/Ext.util.Observable.html#Ext.util.Observable-addListener" ext:member="addListener" ext:cls="Ext.util.Observable">addListener</a>.)<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The method the event invokes</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (<code><b>this</b></code> reference) in which the handler function is executed.