Ext.data.JsonP.Ext_data_JsonP({"mixins":[],"code_type":"ext_define","inheritable":false,"component":false,"meta":{},"mixedInto":[],"uses":[],"aliases":{},"parentMixins":[],"superclasses":["Ext.Base"],"members":{"event":[],"property":[{"meta":{"private":true},"owner":"Ext.Base","tagname":"property","name":"$className","id":"property-S-className"},{"meta":{},"owner":"Ext.data.JsonP","tagname":"property","name":"callbackKey","id":"property-callbackKey"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"property","name":"configMap","id":"property-configMap"},{"meta":{},"owner":"Ext.data.JsonP","tagname":"property","name":"disableCaching","id":"property-disableCaching"},{"meta":{},"owner":"Ext.data.JsonP","tagname":"property","name":"disableCachingParam","id":"property-disableCachingParam"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"property","name":"initConfigList","id":"property-initConfigList"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"property","name":"initConfigMap","id":"property-initConfigMap"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"property","name":"isInstance","id":"property-isInstance"},{"meta":{"private":true},"owner":"Ext.data.JsonP","tagname":"property","name":"requestCount","id":"property-requestCount"},{"meta":{"private":true},"owner":"Ext.data.JsonP","tagname":"property","name":"requests","id":"property-requests"},{"meta":{"protected":true},"owner":"Ext.Base","tagname":"property","name":"self","id":"property-self"},{"meta":{},"owner":"Ext.data.JsonP","tagname":"property","name":"timeout","id":"property-timeout"}],"css_var":[],"method":[{"meta":{},"owner":"Ext.data.JsonP","tagname":"method","name":"abort","id":"method-abort"},{"meta":{"deprecated":{"text":"as of 4.1. Use {@link #callParent} instead."},"protected":true},"owner":"Ext.Base","tagname":"method","name":"callOverridden","id":"method-callOverridden"},{"meta":{"protected":true},"owner":"Ext.Base","tagname":"method","name":"callParent","id":"method-callParent"},{"meta":{"private":true},"owner":"Ext.data.JsonP","tagname":"method","name":"cleanupErrorHandling","id":"method-cleanupErrorHandling"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"method","name":"configClass","id":"method-configClass"},{"meta":{"private":true},"owner":"Ext.data.JsonP","tagname":"method","name":"createScript","id":"method-createScript"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"method","name":"destroy","id":"method-destroy"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"method","name":"getConfig","id":"method-getConfig"},{"meta":{},"owner":"Ext.Base","tagname":"method","name":"getInitialConfig","id":"method-getInitialConfig"},{"meta":{"private":true},"owner":"Ext.data.JsonP","tagname":"method","name":"handleAbort","id":"method-handleAbort"},{"meta":{"private":true},"owner":"Ext.data.JsonP","tagname":"method","name":"handleError","id":"method-handleError"},{"meta":{"private":true},"owner":"Ext.data.JsonP","tagname":"method","name":"handleResponse","id":"method-handleResponse"},{"meta":{"private":true},"owner":"Ext.data.JsonP","tagname":"method","name":"handleTimeout","id":"method-handleTimeout"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"method","name":"hasConfig","id":"method-hasConfig"},{"meta":{"protected":true},"owner":"Ext.Base","tagname":"method","name":"initConfig","id":"method-initConfig"},{"meta":{"private":true},"owner":"Ext.data.JsonP","tagname":"method","name":"loadScript","id":"method-loadScript"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"method","name":"onConfigUpdate","id":"method-onConfigUpdate"},{"meta":{},"owner":"Ext.data.JsonP","tagname":"method","name":"request","id":"method-request"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"method","name":"setConfig","id":"method-setConfig"},{"meta":{"private":true},"owner":"Ext.data.JsonP","tagname":"method","name":"setupErrorHandling","id":"method-setupErrorHandling"},{"meta":{"protected":true},"owner":"Ext.Base","tagname":"method","name":"statics","id":"method-statics"}],"css_mixin":[],"cfg":[]},"tagname":"class","extends":"Ext.Base","html":"

Hierarchy

Ext.Base
Ext.data.JsonP

Files

This class is used to create JSONP requests. JSONP is a mechanism that allows for making\nrequests for data cross domain. More information is available here.

\n
Defined By

Properties

...
\n

Defaults to: "Ext.Base"

Specifies the GET parameter that will be sent to the server containing the function name to be executed when\nthe requ...

Specifies the GET parameter that will be sent to the server containing the function name to be executed when\nthe request completes. Defaults to callback. Thus, a common request will be in the form of\nurl?callback=Ext.data.JsonP.callback1

\n

Defaults to: "callback"

...
\n

Defaults to: {}

True to add a unique cache-buster param to requests. ...

True to add a unique cache-buster param to requests. Defaults to true.

\n

Defaults to: true

Change the parameter which is sent went disabling caching through a cache buster. ...

Change the parameter which is sent went disabling caching through a cache buster. Defaults to '_dc'.

\n

Defaults to: "_dc"

...
\n

Defaults to: []

...
\n

Defaults to: {}

...
\n

Defaults to: true

Ext.data.JsonP
view source
: Numberprivate
Number of requests done so far. ...

Number of requests done so far.

\n

Defaults to: 0

Ext.data.JsonP
view source
: Objectprivate
Hash of pending requests. ...

Hash of pending requests.

\n

Defaults to: {}

Get the reference to the current class from which this object was instantiated. ...

Get the reference to the current class from which this object was instantiated. Unlike statics,\nthis.self is scope-dependent and it's meant to be used for dynamic inheritance. See statics\nfor a detailed comparison

\n\n
Ext.define('My.Cat', {\n    statics: {\n        speciesName: 'Cat' // My.Cat.speciesName = 'Cat'\n    },\n\n    constructor: function() {\n        alert(this.self.speciesName); // dependent on 'this'\n    },\n\n    clone: function() {\n        return new this.self();\n    }\n});\n\n\nExt.define('My.SnowLeopard', {\n    extend: 'My.Cat',\n    statics: {\n        speciesName: 'Snow Leopard'         // My.SnowLeopard.speciesName = 'Snow Leopard'\n    }\n});\n\nvar cat = new My.Cat();                     // alerts 'Cat'\nvar snowLeopard = new My.SnowLeopard();     // alerts 'Snow Leopard'\n\nvar clone = snowLeopard.clone();\nalert(Ext.getClassName(clone));             // alerts 'My.SnowLeopard'\n
\n
Ext.data.JsonP
view source
: Number
A default timeout for any JsonP requests. ...

A default timeout for any JsonP requests. If the request has not completed in this time the\nfailure callback will be fired. The timeout is in ms. Defaults to 30000.

\n

Defaults to: 30000

Defined By

Methods

Ext.data.JsonP
view source
( [Object/String request] )
Abort a request. ...

Abort a request. If the request parameter is not specified all open requests will\nbe aborted.

\n

Parameters

( Array/Arguments args ) : Objectdeprecatedprotected
Call the original method that was previously overridden with override\n\nExt.define('My.Cat', {\n constructor: functi...

Call the original method that was previously overridden with override

\n\n
Ext.define('My.Cat', {\n    constructor: function() {\n        alert(\"I'm a cat!\");\n    }\n});\n\nMy.Cat.override({\n    constructor: function() {\n        alert(\"I'm going to be a cat!\");\n\n        this.callOverridden();\n\n        alert(\"Meeeeoooowwww\");\n    }\n});\n\nvar kitty = new My.Cat(); // alerts \"I'm going to be a cat!\"\n                          // alerts \"I'm a cat!\"\n                          // alerts \"Meeeeoooowwww\"\n
\n
\n

This method has been deprecated

\n

as of 4.1. Use callParent instead.

\n\n
\n

Parameters

  • args : Array/Arguments

    The arguments, either an array or the arguments object\nfrom the current method, for example: this.callOverridden(arguments)

    \n

Returns

  • Object

    Returns the result of calling the overridden method

    \n
( Array/Arguments args ) : Objectprotected
Call the \"parent\" method of the current method. ...

Call the \"parent\" method of the current method. That is the method previously\noverridden by derivation or by an override (see Ext.define).

\n\n
 Ext.define('My.Base', {\n     constructor: function (x) {\n         this.x = x;\n     },\n\n     statics: {\n         method: function (x) {\n             return x;\n         }\n     }\n });\n\n Ext.define('My.Derived', {\n     extend: 'My.Base',\n\n     constructor: function () {\n         this.callParent([21]);\n     }\n });\n\n var obj = new My.Derived();\n\n alert(obj.x);  // alerts 21\n
\n\n

This can be used with an override as follows:

\n\n
 Ext.define('My.DerivedOverride', {\n     override: 'My.Derived',\n\n     constructor: function (x) {\n         this.callParent([x*2]); // calls original My.Derived constructor\n     }\n });\n\n var obj = new My.Derived();\n\n alert(obj.x);  // now alerts 42\n
\n\n

This also works with static methods.

\n\n
 Ext.define('My.Derived2', {\n     extend: 'My.Base',\n\n     statics: {\n         method: function (x) {\n             return this.callParent([x*2]); // calls My.Base.method\n         }\n     }\n });\n\n alert(My.Base.method(10);     // alerts 10\n alert(My.Derived2.method(10); // alerts 20\n
\n\n

Lastly, it also works with overridden static methods.

\n\n
 Ext.define('My.Derived2Override', {\n     override: 'My.Derived2',\n\n     statics: {\n         method: function (x) {\n             return this.callParent([x*2]); // calls My.Derived2.method\n         }\n     }\n });\n\n alert(My.Derived2.method(10); // now alerts 40\n
\n

Parameters

  • args : Array/Arguments

    The arguments, either an array or the arguments object\nfrom the current method, for example: this.callParent(arguments)

    \n

Returns

  • Object

    Returns the result of calling the parent method

    \n
Ext.data.JsonP
view source
( Object request )private
Cleans up anu script handling errors ...

Cleans up anu script handling errors

\n

Parameters

Ext.data.JsonP
view source
( String url, Object params, Object options )private
Create the script tag given the specified url, params and options. ...

Create the script tag given the specified url, params and options. The options\nparameter is passed to allow an override to access it.

\n

Parameters

  • url : String

    The url of the request

    \n
  • params : Object

    Any extra params to be sent

    \n
  • options : Object

    The object passed to request.

    \n
...
\n

Parameters

Returns the initial configuration passed to constructor when instantiating\nthis class. ...

Returns the initial configuration passed to constructor when instantiating\nthis class.

\n

Parameters

  • name : String (optional)

    Name of the config option to return.

    \n

Returns

  • Object/Mixed

    The full config object or a single config value\nwhen name parameter specified.

    \n
Ext.data.JsonP
view source
( Object request )private
Handles any aborts when loading the script ...

Handles any aborts when loading the script

\n

Parameters

Ext.data.JsonP
view source
( Object request )private
Handles any script errors when loading the script ...

Handles any script errors when loading the script

\n

Parameters

Ext.data.JsonP
view source
( Object result, Object request )private
Handle a successful response ...

Handle a successful response

\n

Parameters

  • result : Object

    The result from the request

    \n
  • request : Object

    The request

    \n
Ext.data.JsonP
view source
( Object request )private
Handle any script timeouts ...

Handle any script timeouts

\n

Parameters

...
\n

Parameters

Initialize configuration for this class. ...

Initialize configuration for this class. a typical example:

\n\n
Ext.define('My.awesome.Class', {\n    // The default config\n    config: {\n        name: 'Awesome',\n        isAwesome: true\n    },\n\n    constructor: function(config) {\n        this.initConfig(config);\n    }\n});\n\nvar awesome = new My.awesome.Class({\n    name: 'Super Awesome'\n});\n\nalert(awesome.getName()); // 'Super Awesome'\n
\n

Parameters

Returns

Ext.data.JsonP
view source
( Object request )private
Loads the script for the given request by appending it to the HEAD element. ...

Loads the script for the given request by appending it to the HEAD element. This is\nits own method so that users can override it (as well as createScript).

\n

Parameters

  • request : Object

    The request object.

    \n
( Object names, Object callback, Object scope )private
...
\n

Parameters

Ext.data.JsonP
view source
( Object options ) : Object
Makes a JSONP request. ...

Makes a JSONP request.

\n

Parameters

  • options : Object

    An object which may contain the following properties. Note that options will\ntake priority over any defaults that are specified in the class.

    \n\n
      \n
    • url : String
      The URL to request.
    • \n
    • params : Object (Optional)
      An object containing a series of\nkey value pairs that will be sent along with the request.
    • \n
    • timeout : Number (Optional)
    • \n
    • callbackKey : String (Optional)
    • \n
    • callbackName : String (Optional)
      The function name to use for this request.\nBy default this name will be auto-generated: Ext.data.JsonP.callback1, Ext.data.JsonP.callback2, etc.\nSetting this option to \"my_name\" will force the function name to be Ext.data.JsonP.my_name.\nUse this if you want deterministic behavior, but be careful - the callbackName should be different\nin each JsonP request that you make.
    • \n
    • disableCaching : Boolean (Optional)
    • \n
    • disableCachingParam : String (Optional)
    • \n
    • success : Function (Optional)
      A function to execute if the request succeeds.
    • \n
    • failure : Function (Optional)
      A function to execute if the request fails.
    • \n
    • callback : Function (Optional)
      A function to execute when the request\ncompletes, whether it is a success or failure.
    • \n
    • scope : Object (Optional)
      The scope in\nwhich to execute the callbacks: The \"this\" object for the callback function. Defaults to the browser window.
    • \n
    \n\n

Returns

  • Object

    request An object containing the request details.

    \n
( Object config, Object applyIfNotSet )private
...
\n

Parameters

Ext.data.JsonP
view source
( Object request )private
Sets up error handling for the script ...

Sets up error handling for the script

\n

Parameters

Get the reference to the class from which this object was instantiated. ...

Get the reference to the class from which this object was instantiated. Note that unlike self,\nthis.statics() is scope-independent and it always returns the class from which it was called, regardless of what\nthis points to during run-time

\n\n
Ext.define('My.Cat', {\n    statics: {\n        totalCreated: 0,\n        speciesName: 'Cat' // My.Cat.speciesName = 'Cat'\n    },\n\n    constructor: function() {\n        var statics = this.statics();\n\n        alert(statics.speciesName);     // always equals to 'Cat' no matter what 'this' refers to\n                                        // equivalent to: My.Cat.speciesName\n\n        alert(this.self.speciesName);   // dependent on 'this'\n\n        statics.totalCreated++;\n    },\n\n    clone: function() {\n        var cloned = new this.self;                      // dependent on 'this'\n\n        cloned.groupName = this.statics().speciesName;   // equivalent to: My.Cat.speciesName\n\n        return cloned;\n    }\n});\n\n\nExt.define('My.SnowLeopard', {\n    extend: 'My.Cat',\n\n    statics: {\n        speciesName: 'Snow Leopard'     // My.SnowLeopard.speciesName = 'Snow Leopard'\n    },\n\n    constructor: function() {\n        this.callParent();\n    }\n});\n\nvar cat = new My.Cat();                 // alerts 'Cat', then alerts 'Cat'\n\nvar snowLeopard = new My.SnowLeopard(); // alerts 'Cat', then alerts 'Snow Leopard'\n\nvar clone = snowLeopard.clone();\nalert(Ext.getClassName(clone));         // alerts 'My.SnowLeopard'\nalert(clone.groupName);                 // alerts 'Cat'\n\nalert(My.Cat.totalCreated);             // alerts 3\n
\n

Returns

","subclasses":[],"name":"Ext.data.JsonP","alternateClassNames":[],"inheritdoc":null,"files":[{"href":"JsonP.html#Ext-data-JsonP","filename":"JsonP.js"}],"html_meta":{},"singleton":true,"id":"class-Ext.data.JsonP","statics":{"property":[],"event":[],"css_var":[],"method":[],"css_mixin":[],"cfg":[]},"requires":[]});