Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="exml:ext.direct" xmlns:ed="exml:ext.direct" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:exml="http://www.jangaroo.net/exml/0.8" xmlns:eu="exml:ext.util" >
  <xs:import namespace="http://www.jangaroo.net/exml/0.8"/>
  <xs:import namespace="exml:ext.util"/>
  <xs:complexType name='JsonProvider_TYPE'>
    <xs:complexContent>
      <xs:extension base='ed:Provider_TYPE'>
        <xs:sequence>
        </xs:sequence>
        <xs:anyAttribute namespace="http://www.jangaroo.net/exml/0.8 exml:untyped" processContents="skip"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name='JsonProvider' type='ed:JsonProvider_TYPE' substitutionGroup='ed:Provider'>
    <xs:annotation>
      <xs:documentation>
        <p>This class serves as a typed config object for constructor of class JsonProvider.</p> <p>Copyright &#169; 2011 Sencha Inc.</p> @see ext.direct.JsonProvider
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name='PollingProvider_TYPE'>
    <xs:complexContent>
      <xs:extension base='ed:JsonProvider_TYPE'>
        <xs:sequence>
            <xs:element name='baseParams' minOccurs="0" maxOccurs="1">
              <xs:annotation>
                <xs:documentation>
                  An object containing properties which are to be sent as parameters on every polling request
                </xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name='url' minOccurs="0" maxOccurs="1">
              <xs:annotation>
                <xs:documentation>
                  The url which the PollingProvider should contact with each request. This can also be an imported Ext.Direct method which will accept the baseParams as its only argument.
                </xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
        </xs:sequence>
        <xs:attribute type='exml:String' name='baseParams'>
          <xs:annotation>
            <xs:documentation>
              An object containing properties which are to be sent as parameters on every polling request
            </xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute type='exml:Number' name='interval'>
          <xs:annotation>
            <xs:documentation>
              How often to poll the server-side in milliseconds (defaults to <tt>3000</tt> - every 3 seconds).
            </xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute type='exml:String' name='url'>
          <xs:annotation>
            <xs:documentation>
              The url which the PollingProvider should contact with each request. This can also be an imported Ext.Direct method which will accept the baseParams as its only argument.
            </xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:anyAttribute namespace="http://www.jangaroo.net/exml/0.8 exml:untyped" processContents="skip"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name='PollingProvider' type='ed:PollingProvider_TYPE' substitutionGroup='ed:JsonProvider'>
    <xs:annotation>
      <xs:documentation>
        Provides for repetitive polling of the server at distinct <a href="output/Ext.direct.PollingProvider.html#Ext.direct.PollingProvider-interval">intervals</a>. The initial request for data originates from the client, and then is responded to by the server. <p>All configurations for the PollingProvider should be generated by the server-side API portion of the Ext.Direct stack.</p><p>An instance of PollingProvider may be created directly via the new keyword or by simply specifying <tt>type = 'polling'</tt>. For example:</p><pre><code>var pollA = new Ext.direct.PollingProvider({ type:'polling', url: 'php/pollA.php', }); Ext.Direct.addProvider(pollA); pollA.disconnect(); Ext.Direct.addProvider( { type:'polling', url: 'php/pollB.php', id: 'pollB-provider' } ); var pollB = Ext.Direct.getProvider('pollB-provider'); </code></pre> <p>This class serves as a typed config object for constructor of class PollingProvider.</p> <p>Copyright &#169; 2011 Sencha Inc.</p> @see ext.direct.PollingProvider
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name='Provider_TYPE'>
    <xs:complexContent>
      <xs:extension base='eu:Observable_TYPE'>
        <xs:sequence>
        </xs:sequence>
        <xs:attribute type='exml:String' name='id'>
          <xs:annotation>
            <xs:documentation>
              The unique id of the provider (defaults to an <a href="output/Ext.html#Ext-id">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: 'polling', url: 'php/poll.php', id: 'poll-provider' } ); var p = <a href="Ext.Direct.html">Ext.Direct</a>.<a href="output/Ext.Direct.html#Ext.Direct-getProvider">getProvider</a>('poll-provider'); p.disconnect(); </code></pre>
            </xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute type='exml:Number' name='priority'>
          <xs:annotation>
            <xs:documentation>
              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>.
            </xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute type='exml:String' name='type'>
          <xs:annotation>
            <xs:documentation>
              <b>Required</b>, <tt>undefined</tt> by default. The <tt>type</tt> of provider specified to <a href="Ext.Direct.html">Ext.Direct</a>.<a href="output/Ext.Direct.html#Ext.Direct-addProvider">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="Ext.direct.PollingProvider.html">PollingProvider</a></li><li><b><tt>remoting</tt></b> : <a href="Ext.direct.RemotingProvider.html">RemotingProvider</a></li></ul></div>
            </xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:anyAttribute namespace="http://www.jangaroo.net/exml/0.8 exml:untyped" processContents="skip"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name='Provider' type='ed:Provider_TYPE' substitutionGroup='eu:Observable'>
    <xs:annotation>
      <xs:documentation>
        Ext.direct.Provider is an abstract class meant to be extended. <p>For example ExtJs implements the following subclasses:</p><pre><code>Provider | +---<a href="Ext.direct.JsonProvider.html">JsonProvider</a> | +---<a href="Ext.direct.PollingProvider.html">PollingProvider</a> | +---<a href="Ext.direct.RemotingProvider.html">RemotingProvider</a> </code></pre> <p>This class serves as a typed config object for constructor of class Provider.</p> <p>Copyright &#169; 2011 Sencha Inc.</p> @see ext.direct.Provider
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name='RemotingProvider_TYPE'>
    <xs:complexContent>
      <xs:extension base='ed:JsonProvider_TYPE'>
        <xs:sequence>
            <xs:element name='actions' minOccurs="0" maxOccurs="1">
              <xs:annotation>
                <xs:documentation>
                  Object literal defining the server side actions and methods. For example, if the Provider is configured with: <pre><code>"actions":{ // each property within the 'actions' object represents a server side Class "TestAction":[ // array of methods within each server side Class to be { // stubbed out on client "name":"doEcho", "len":1 },{ "name":"multiply",// name of method "len":2 // The number of parameters that will be used to create an // array of data to send to the server side function. // Ensure the server sends back a Number, not a String. },{ "name":"doForm", "formHandler":true, // direct the client to use specialized form handling method "len":1 }] } </code></pre><p>Note that a Store is not required, a server method can be called at any time. In the following example a <b>client side</b> handler is used to call the server side method "multiply" in the server-side "TestAction" Class:</p><pre><code>TestAction.multiply( 2, 4, // pass two arguments to server, so specify len=2 // callback function after the server is called // result: the result returned by the server // e: Ext.Direct.RemotingEvent object function(result, e){ var t = e.getTransaction(); var action = t.action; // server side Class called var method = t.method; // server side method called if(e.status){ var answer = Ext.encode(result); // 8 }else{ var msg = e.message; // failure message } } ); </code></pre>In the example above, the server side "multiply" function will be passed two arguments (2 and 4). The "multiply" method should return the value 8 which will be available as the <tt>result</tt> in the example above.
                </xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name='enableBuffer' minOccurs="0" maxOccurs="1">
              <xs:annotation>
                <xs:documentation>
                  <tt>true</tt> or <tt>false</tt> to enable or disable combining of method calls. If a number is specified this is the amount of time in milliseconds to wait before sending a batched request (defaults to <tt>10</tt>). <br/><p>Calls which are received within the specified timeframe will be concatenated together and sent in a single request, optimizing the application by reducing the amount of round trips that have to be made to the server.</p>
                </xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name='namespace' minOccurs="0" maxOccurs="1">
              <xs:annotation>
                <xs:documentation>
                  Namespace for the Remoting Provider (defaults to the browser global scope of <i>window</i>). Explicitly specify the namespace Object, or specify a String to have a <a href="output/Ext.html#Ext-namespace">namespace created</a> implicitly.
                </xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
        </xs:sequence>
        <xs:attribute type='exml:String' name='actions'>
          <xs:annotation>
            <xs:documentation>
              Object literal defining the server side actions and methods. For example, if the Provider is configured with: <pre><code>"actions":{ // each property within the 'actions' object represents a server side Class "TestAction":[ // array of methods within each server side Class to be { // stubbed out on client "name":"doEcho", "len":1 },{ "name":"multiply",// name of method "len":2 // The number of parameters that will be used to create an // array of data to send to the server side function. // Ensure the server sends back a Number, not a String. },{ "name":"doForm", "formHandler":true, // direct the client to use specialized form handling method "len":1 }] } </code></pre><p>Note that a Store is not required, a server method can be called at any time. In the following example a <b>client side</b> handler is used to call the server side method "multiply" in the server-side "TestAction" Class:</p><pre><code>TestAction.multiply( 2, 4, // pass two arguments to server, so specify len=2 // callback function after the server is called // result: the result returned by the server // e: Ext.Direct.RemotingEvent object function(result, e){ var t = e.getTransaction(); var action = t.action; // server side Class called var method = t.method; // server side method called if(e.status){ var answer = Ext.encode(result); // 8 }else{ var msg = e.message; // failure message } } ); </code></pre>In the example above, the server side "multiply" function will be passed two arguments (2 and 4). The "multiply" method should return the value 8 which will be available as the <tt>result</tt> in the example above.
            </xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute type='exml:String' name='enableBuffer'>
          <xs:annotation>
            <xs:documentation>
              <tt>true</tt> or <tt>false</tt> to enable or disable combining of method calls. If a number is specified this is the amount of time in milliseconds to wait before sending a batched request (defaults to <tt>10</tt>). <br/><p>Calls which are received within the specified timeframe will be concatenated together and sent in a single request, optimizing the application by reducing the amount of round trips that have to be made to the server.</p>
            </xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute type='exml:String' name='enableUrlEncode'>
          <xs:annotation>
            <xs:documentation>
              Specify which param will hold the arguments for the method. Defaults to <tt>'data'</tt>.
            </xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute type='exml:Number' name='maxRetries'>
          <xs:annotation>
            <xs:documentation>
              Number of times to re-attempt delivery on failure of a call. Defaults to <tt>1</tt>.
            </xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute type='exml:String' name='namespace'>
          <xs:annotation>
            <xs:documentation>
              Namespace for the Remoting Provider (defaults to the browser global scope of <i>window</i>). Explicitly specify the namespace Object, or specify a String to have a <a href="output/Ext.html#Ext-namespace">namespace created</a> implicitly.
            </xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute type='exml:Number' name='timeout'>
          <xs:annotation>
            <xs:documentation>
              The timeout to use for each request. Defaults to <tt>undefined</tt>.
            </xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute type='exml:String' name='url'>
          <xs:annotation>
            <xs:documentation>
              <b>Required</b>. The url to connect to the <a href="Ext.Direct.html">Ext.Direct</a> server-side router.
            </xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:anyAttribute namespace="http://www.jangaroo.net/exml/0.8 exml:untyped" processContents="skip"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name='RemotingProvider' type='ed:RemotingProvider_TYPE' substitutionGroup='ed:JsonProvider'>
    <xs:annotation>
      <xs:documentation>
        The <a href="Ext.direct.RemotingProvider.html">RemotingProvider</a> exposes access to server side methods on the client (a remote procedure call (RPC) type of connection where the client can initiate a procedure on the server). <p>This allows for code to be organized in a fashion that is maintainable, while providing a clear path between client and server, something that is not always apparent when using URLs.</p><p>To accomplish this the server-side needs to describe what classes and methods are available on the client-side. This configuration will typically be outputted by the server-side Ext.Direct stack when the API description is built.</p> <p>This class serves as a typed config object for constructor of class RemotingProvider.</p> <p>Copyright &#169; 2011 Sencha Inc.</p> @see ext.direct.RemotingProvider
      </xs:documentation>
    </xs:annotation>
  </xs:element>
</xs:schema>
New to GrepCode? Check out our FAQ X