X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6746dc89c47ed01b165cc1152533605f97eb8e8d..f562e4c6e5fac7bcb445985b99acbea4d706e6f0:/docs/output/Ext.data.reader.Json.js diff --git a/docs/output/Ext.data.reader.Json.js b/docs/output/Ext.data.reader.Json.js index b6df12bb..bc2eec52 100644 --- a/docs/output/Ext.data.reader.Json.js +++ b/docs/output/Ext.data.reader.Json.js @@ -1,339 +1 @@ -Ext.data.JsonP.Ext_data_reader_Json({ - "allMixins": [ - - ], - "deprecated": null, - "docauthor": null, - "members": { - "cfg": [ - { - "type": "String", - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "cfg", - "href": "Reader.html#Ext-data-reader-Reader-cfg-idProperty", - "shortDoc": "Name of the property within a row object\nthat contains a record identifier value. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/data/reader/Reader.js", - "private": false, - "name": "idProperty", - "owner": "Ext.data.reader.Reader", - "doc": "
Name of the property within a row object\nthat contains a record identifier value. Defaults to The id of the model.\nIf an idProperty is explicitly specified it will override that of the one specified\non the model
\n", - "linenr": 151, - "html_filename": "Reader.html" - }, - { - "type": "Boolean", - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "cfg", - "href": "Reader.html#Ext-data-reader-Reader-cfg-implicitIncludes", - "shortDoc": "True to automatically parse models nested within other models in a response\nobject. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/data/reader/Reader.js", - "private": false, - "name": "implicitIncludes", - "owner": "Ext.data.reader.Reader", - "doc": "True to automatically parse models nested within other models in a response\nobject. See the Ext.data.reader.Reader intro docs for full explanation. Defaults to true.
\n", - "linenr": 188, - "html_filename": "Reader.html" - }, - { - "type": "String", - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "cfg", - "href": "Reader.html#Ext-data-reader-Reader-cfg-messageProperty", - "shortDoc": "The name of the property which contains a response message. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/data/reader/Reader.js", - "private": false, - "name": "messageProperty", - "owner": "Ext.data.reader.Reader", - "doc": "The name of the property which contains a response message.\nThis property is optional.
\n", - "linenr": 183, - "html_filename": "Reader.html" - }, - { - "type": "String", - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "cfg", - "href": "Json.html#Ext-data-reader-Json-cfg-record", - "shortDoc": "The optional location within the JSON response that the record data itself can be found at. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/data/reader/Json.js", - "private": false, - "name": "record", - "owner": "Ext.data.reader.Json", - "doc": "The optional location within the JSON response that the record data itself can be found at.\nSee the JsonReader intro docs for more details. This is not often needed and defaults to undefined.
\n", - "linenr": 167, - "html_filename": "Json.html" - }, - { - "type": "String", - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "cfg", - "href": "Reader.html#Ext-data-reader-Reader-cfg-root", - "shortDoc": "Required. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/data/reader/Reader.js", - "private": false, - "name": "root", - "owner": "Ext.data.reader.Reader", - "doc": "Required. The name of the property\nwhich contains the Array of row objects. Defaults to undefined.\nAn exception will be thrown if the root property is undefined. The data\npacket value for this property should be an empty array to clear the data\nor show no data.
\n", - "linenr": 174, - "html_filename": "Reader.html" - }, - { - "type": "String", - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "cfg", - "href": "Reader.html#Ext-data-reader-Reader-cfg-successProperty", - "shortDoc": "Name of the property from which to\nretrieve the success attribute. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/data/reader/Reader.js", - "private": false, - "name": "successProperty", - "owner": "Ext.data.reader.Reader", - "doc": "Name of the property from which to\nretrieve the success attribute. Defaults to success. See\nExt.data.proxy.Proxy.exception\nfor additional information.
\n", - "linenr": 166, - "html_filename": "Reader.html" - }, - { - "type": "String", - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "cfg", - "href": "Reader.html#Ext-data-reader-Reader-cfg-totalProperty", - "shortDoc": "Name of the property from which to\nretrieve the total number of records in the dataset. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/data/reader/Reader.js", - "private": false, - "name": "totalProperty", - "owner": "Ext.data.reader.Reader", - "doc": "Name of the property from which to\nretrieve the total number of records in the dataset. This is only needed\nif the whole dataset is not passed in one go, but is being paged from\nthe remote server. Defaults to total.
\n", - "linenr": 158, - "html_filename": "Reader.html" - }, - { - "type": "Boolean", - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "cfg", - "href": "Json.html#Ext-data-reader-Json-cfg-useSimpleAccessors", - "shortDoc": "True to ensure that field names/mappings are treated as literals when\nreading values. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/data/reader/Json.js", - "private": false, - "name": "useSimpleAccessors", - "owner": "Ext.data.reader.Json", - "doc": "True to ensure that field names/mappings are treated as literals when\nreading values. Defalts to false.\nFor example, by default, using the mapping \"foo.bar.baz\" will try and read a property foo from the root, then a property bar\nfrom foo, then a property baz from bar. Setting the simple accessors to true will read the property with the name\n\"foo.bar.baz\" direct from the root object.
\n", - "linenr": 172, - "html_filename": "Json.html" - } - ], - "method": [ - { - "deprecated": null, - "alias": null, - "href": "Reader.html#Ext-data-reader-Reader-method-constructor", - "tagname": "method", - "protected": false, - "shortDoc": "Creates new Reader. ...", - "static": false, - "params": [ - { - "type": "Object", - "optional": true, - "doc": "(optional) Config object.
\n", - "name": "config" - } - ], - "private": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/data/reader/Reader.js", - "doc": "Creates new Reader.
\n", - "owner": "Ext.data.reader.Reader", - "name": "Json", - "html_filename": "Reader.html", - "return": { - "type": "Object", - "doc": "\n" - }, - "linenr": 196 - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Reader.html#Ext-data-reader-Reader-method-getResponseData", - "shortDoc": "Takes a raw response object (as passed to this.read) and returns the useful data segment of it. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/data/reader/Reader.js", - "private": false, - "params": [ - { - "type": "Object", - "optional": false, - "doc": "The responce object
\n", - "name": "response" - } - ], - "name": "getResponseData", - "owner": "Ext.data.reader.Reader", - "doc": "Takes a raw response object (as passed to this.read) and returns the useful data segment of it. This must be implemented by each subclass
\n", - "linenr": 460, - "return": { - "type": "Object", - "doc": "The useful data from the response
\n" - }, - "html_filename": "Reader.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Reader.html#Ext-data-reader-Reader-method-read", - "shortDoc": "Reads the given response object. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/data/reader/Reader.js", - "private": false, - "params": [ - { - "type": "Object", - "optional": false, - "doc": "The response object. This may be either an XMLHttpRequest object or a plain JS object
\n", - "name": "response" - } - ], - "name": "read", - "owner": "Ext.data.reader.Reader", - "doc": "Reads the given response object. This method normalizes the different types of response object that may be passed\nto it, before handing off the reading of records to the readRecords function.
\n", - "linenr": 228, - "return": { - "type": "Ext.data.ResultSet", - "doc": "The parsed ResultSet object
\n" - }, - "html_filename": "Reader.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Json.html#Ext-data-reader-Json-method-readRecords", - "shortDoc": "Reads a JSON object and returns a ResultSet. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/data/reader/Json.js", - "private": false, - "params": [ - { - "type": "Object", - "optional": false, - "doc": "The raw JSON data
\n", - "name": "data" - } - ], - "name": "readRecords", - "owner": "Ext.data.reader.Json", - "doc": "Reads a JSON object and returns a ResultSet. Uses the internal getTotal and getSuccess extractors to\nretrieve meta data from the response, and extractData to turn the JSON data into model instances.
\n", - "linenr": 181, - "return": { - "type": "Ext.data.ResultSet", - "doc": "A ResultSet containing model instances and meta data about the results
\n" - }, - "html_filename": "Json.html" - } - ], - "property": [ - { - "type": "Mixed", - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "property", - "href": "Json.html#Ext-data-reader-Json-property-jsonData", - "shortDoc": "DEPRECATED - will be removed in Ext JS 5.0. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/data/reader/Json.js", - "private": false, - "name": "jsonData", - "owner": "Ext.data.reader.Json", - "doc": "DEPRECATED - will be removed in Ext JS 5.0. This is just a copy of this.rawData - use that instead
\n", - "linenr": 193, - "html_filename": "Json.html" - }, - { - "type": "Mixed", - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "property", - "href": "Reader.html#Ext-data-reader-Reader-property-rawData", - "shortDoc": "The raw data object that was last passed to readRecords. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/data/reader/Reader.js", - "private": false, - "name": "rawData", - "owner": "Ext.data.reader.Reader", - "doc": "The raw data object that was last passed to readRecords. Stored for further processing if needed
\n", - "linenr": 268, - "html_filename": "Reader.html" - } - ], - "cssVar": [ - - ], - "cssMixin": [ - - ], - "event": [ - - ] - }, - "singleton": false, - "alias": null, - "superclasses": [ - "Ext.data.reader.Reader" - ], - "protected": false, - "tagname": "class", - "mixins": [ - - ], - "href": "Json.html#Ext-data-reader-Json", - "subclasses": [ - "Ext.data.reader.Array" - ], - "static": false, - "author": "Ed Spencer", - "component": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/data/reader/Json.js", - "private": false, - "alternateClassNames": [ - "Ext.data.JsonReader" - ], - "name": "Ext.data.reader.Json", - "doc": "The JSON Reader is used by a Proxy to read a server response that is sent back in JSON format. This usually\nhappens as a result of loading a Store - for example we might create something like this:
\n\n\n\n\nExt.define('User', {\n extend: 'Ext.data.Model',\n fields: ['id', 'name', 'email']\n});\n\nvar store = new Ext.data.Store({\n model: 'User',\n proxy: {\n type: 'ajax',\n url : 'users.json',\n reader: {\n type: 'json'\n }\n }\n});\n
\n\n\n\n\nThe example above creates a 'User' model. Models are explained in the Model docs if you're\nnot already familiar with them.
\n\n\n\n\nWe created the simplest type of JSON Reader possible by simply telling our Store's \nProxy that we want a JSON Reader. The Store automatically passes the configured model to the\nStore, so it is as if we passed this instead:\n\n
reader: {\n type : 'json',\n model: 'User'\n}\n
\n\nThe reader we set up is ready to read data from our server - at the moment it will accept a response like this:
\n\n[\n {\n \"id\": 1,\n \"name\": \"Ed Spencer\",\n \"email\": \"ed@sencha.com\"\n },\n {\n \"id\": 2,\n \"name\": \"Abe Elias\",\n \"email\": \"abe@sencha.com\"\n }\n]\n
\n\nReading other JSON formats
\n\nIf you already have your JSON format defined and it doesn't look quite like what we have above, you can usually\npass JsonReader a couple of configuration options to make it parse your format. For example, we can use the \nroot configuration to parse data that comes back like this:
\n\n{\n \"users\": [\n {\n \"id\": 1,\n \"name\": \"Ed Spencer\",\n \"email\": \"ed@sencha.com\"\n },\n {\n \"id\": 2,\n \"name\": \"Abe Elias\",\n \"email\": \"abe@sencha.com\"\n }\n ]\n}\n
\n\nTo parse this we just pass in a root configuration that matches the 'users' above:
\n\nreader: {\n type: 'json',\n root: 'users'\n}\n
\n\nSometimes the JSON structure is even more complicated. Document databases like CouchDB often provide metadata\naround each record inside a nested structure like this:
\n\n{\n \"total\": 122,\n \"offset\": 0,\n \"users\": [\n {\n \"id\": \"ed-spencer-1\",\n \"value\": 1,\n \"user\": {\n \"id\": 1,\n \"name\": \"Ed Spencer\",\n \"email\": \"ed@sencha.com\"\n }\n }\n ]\n}\n
\n\nIn the case above the record data is nested an additional level inside the \"users\" array as each \"user\" item has\nadditional metadata surrounding it ('id' and 'value' in this case). To parse data out of each \"user\" item in the \nJSON above we need to specify the record configuration like this:
\n\nreader: {\n type : 'json',\n root : 'users',\n record: 'user'\n}\n
\n\nResponse metadata
\n\nThe server can return additional data in its response, such as the total number of records \nand the success status of the response. These are typically included in the JSON response\nlike this:
\n\n{\n \"total\": 100,\n \"success\": true,\n \"users\": [\n {\n \"id\": 1,\n \"name\": \"Ed Spencer\",\n \"email\": \"ed@sencha.com\"\n }\n ]\n}\n
\n\nIf these properties are present in the JSON response they can be parsed out by the JsonReader and used by the\nStore that loaded it. We can set up the names of these properties by specifying a final pair of configuration \noptions:
\n\nreader: {\n type : 'json',\n root : 'users',\n totalProperty : 'total',\n successProperty: 'success'\n}\n
\n\nThese final options are not necessary to make the Reader work, but can be useful when the server needs to report\nan error or if it needs to indicate that there is a lot of data available of which only a subset is currently being\nreturned.
\n\n", - "mixedInto": [ - - ], - "linenr": 1, - "xtypes": [ - - ], - "html_filename": "Json.html", - "extends": "Ext.data.reader.Reader" -}); \ No newline at end of file +Ext.data.JsonP.Ext_data_reader_Json({"tagname":"class","html":"Alternate names
Ext.data.JsonReaderHierarchy
Ext.BaseExt.data.reader.ReaderExt.data.reader.JsonFiles
The JSON Reader is used by a Proxy to read a server response that is sent back in JSON format. This usually\nhappens as a result of loading a Store - for example we might create something like this:
\n\n\n\n\nExt.define('User', {\n extend: 'Ext.data.Model',\n fields: ['id', 'name', 'email']\n});\n\nvar store = Ext.create('Ext.data.Store', {\n model: 'User',\n proxy: {\n type: 'ajax',\n url : 'users.json',\n reader: {\n type: 'json'\n }\n }\n});\n
\n\n\n\n\nThe example above creates a 'User' model. Models are explained in the Model docs if you're\nnot already familiar with them.
\n\n\n\n\nWe created the simplest type of JSON Reader possible by simply telling our Store's\nProxy that we want a JSON Reader. The Store automatically passes the configured model to the\nStore, so it is as if we passed this instead:\n\n
reader: {\n type : 'json',\n model: 'User'\n}\n
\n\nThe reader we set up is ready to read data from our server - at the moment it will accept a response like this:
\n\n[\n {\n \"id\": 1,\n \"name\": \"Ed Spencer\",\n \"email\": \"ed@sencha.com\"\n },\n {\n \"id\": 2,\n \"name\": \"Abe Elias\",\n \"email\": \"abe@sencha.com\"\n }\n]\n
\n\nReading other JSON formats
\n\nIf you already have your JSON format defined and it doesn't look quite like what we have above, you can usually\npass JsonReader a couple of configuration options to make it parse your format. For example, we can use the\nroot configuration to parse data that comes back like this:
\n\n{\n \"users\": [\n {\n \"id\": 1,\n \"name\": \"Ed Spencer\",\n \"email\": \"ed@sencha.com\"\n },\n {\n \"id\": 2,\n \"name\": \"Abe Elias\",\n \"email\": \"abe@sencha.com\"\n }\n ]\n}\n
\n\nTo parse this we just pass in a root configuration that matches the 'users' above:
\n\nreader: {\n type: 'json',\n root: 'users'\n}\n
\n\nSometimes the JSON structure is even more complicated. Document databases like CouchDB often provide metadata\naround each record inside a nested structure like this:
\n\n{\n \"total\": 122,\n \"offset\": 0,\n \"users\": [\n {\n \"id\": \"ed-spencer-1\",\n \"value\": 1,\n \"user\": {\n \"id\": 1,\n \"name\": \"Ed Spencer\",\n \"email\": \"ed@sencha.com\"\n }\n }\n ]\n}\n
\n\nIn the case above the record data is nested an additional level inside the \"users\" array as each \"user\" item has\nadditional metadata surrounding it ('id' and 'value' in this case). To parse data out of each \"user\" item in the\nJSON above we need to specify the record configuration like this:
\n\nreader: {\n type : 'json',\n root : 'users',\n record: 'user'\n}\n
\n\nResponse metadata
\n\nThe server can return additional data in its response, such as the total number of records\nand the success status of the response. These are typically included in the JSON response\nlike this:
\n\n{\n \"total\": 100,\n \"success\": true,\n \"users\": [\n {\n \"id\": 1,\n \"name\": \"Ed Spencer\",\n \"email\": \"ed@sencha.com\"\n }\n ]\n}\n
\n\nIf these properties are present in the JSON response they can be parsed out by the JsonReader and used by the\nStore that loaded it. We can set up the names of these properties by specifying a final pair of configuration\noptions:
\n\nreader: {\n type : 'json',\n root : 'users',\n totalProperty : 'total',\n successProperty: 'success'\n}\n
\n\nThese final options are not necessary to make the Reader work, but can be useful when the server needs to report\nan error or if it needs to indicate that there is a lot of data available of which only a subset is currently being\nreturned.
\n\nName of the property within a row object that contains a record identifier value. Defaults to The id of the\nmodel. If an idProperty is explicitly specified it will override that of the one specified on the model
\nTrue to automatically parse models nested within other models in a response object. See the\nExt.data.reader.Reader intro docs for full explanation. Defaults to true.
\nDefaults to: true
The name of the property which contains a response message. This property is optional.
\nThe optional location within the JSON response that the record data itself can be found at.\nSee the JsonReader intro docs for more details. This is not often needed.
\nThe name of the property which contains the Array of row objects. For JSON reader it's dot-separated list\nof property names. For XML reader it's a CSS selector. For array reader it's not applicable.
\n\nBy default the natural root of the data will be used. The root Json array, the root XML element, or the array.
\n\nThe data packet value for this property should be an empty array to clear the data or show no data.
\nDefaults to: ""
Name of the property from which to retrieve the success attribute. Defaults to success. See\nExt.data.proxy.Server.exception for additional information.
\nDefaults to: "success"
Name of the property from which to retrieve the total number of records in the dataset. This is only needed if\nthe whole dataset is not passed in one go, but is being paged from the remote server. Defaults to total.
\nDefaults to: "total"
True to ensure that field names/mappings are treated as literals when\nreading values. Defalts to false.\nFor example, by default, using the mapping \"foo.bar.baz\" will try and read a property foo from the root, then a property bar\nfrom foo, then a property baz from bar. Setting the simple accessors to true will read the property with the name\n\"foo.bar.baz\" direct from the root object.
\nDefaults to: false
This property has been deprecated
will be removed in Ext JS 5.0. This is just a copy of this.rawData - use that instead
\nThe raw data object that was last passed to readRecords. Stored for further processing if needed
\nGet 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
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 return 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
\nCall the original method that was previously overridden with override
\n\nExt.define('My.Cat', {\n constructor: function() {\n alert(\"I'm a cat!\");\n\n return this;\n }\n});\n\nMy.Cat.override({\n constructor: function() {\n alert(\"I'm going to be a cat!\");\n\n var instance = this.callOverridden();\n\n alert(\"Meeeeoooowwww\");\n\n return instance;\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
\nThe arguments, either an array or the arguments
object
Returns the result after calling the overridden method
\nCall the parent's overridden method. For example:
\n\nExt.define('My.own.A', {\n constructor: function(test) {\n alert(test);\n }\n});\n\nExt.define('My.own.B', {\n extend: 'My.own.A',\n\n constructor: function(test) {\n alert(test);\n\n this.callParent([test + 1]);\n }\n});\n\nExt.define('My.own.C', {\n extend: 'My.own.B',\n\n constructor: function() {\n alert(\"Going to call parent's overriden constructor...\");\n\n this.callParent(arguments);\n }\n});\n\nvar a = new My.own.A(1); // alerts '1'\nvar b = new My.own.B(1); // alerts '1', then alerts '2'\nvar c = new My.own.C(2); // alerts \"Going to call parent's overriden constructor...\"\n // alerts '2', then alerts '3'\n
\nThe arguments, either an array or the arguments
object\nfrom the current method, for example: this.callParent(arguments)
Returns the result from the superclass' method
\nInitialize configuration for this class. a typical example:
\n\nExt.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 return this;\n }\n});\n\nvar awesome = new My.awesome.Class({\n name: 'Super Awesome'\n});\n\nalert(awesome.getName()); // 'Super Awesome'\n
\nmixins The mixin prototypes as key - value pairs
\nReads the given response object. This method normalizes the different types of response object that may be passed\nto it, before handing off the reading of records to the readRecords function.
\nThe response object. This may be either an XMLHttpRequest object or a plain JS object
\nThe parsed ResultSet object
\nReads a JSON object and returns a ResultSet. Uses the internal getTotal and getSuccess extractors to\nretrieve meta data from the response, and extractData to turn the JSON data into model instances.
\nThe raw JSON data
\nA ResultSet containing model instances and meta data about the results
\nGet 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
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 return this;\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
\nAdd / override static properties of this class.
\n\nExt.define('My.cool.Class', {\n ...\n});\n\nMy.cool.Class.addStatics({\n someProperty: 'someValue', // My.cool.Class.someProperty = 'someValue'\n method1: function() { ... }, // My.cool.Class.method1 = function() { ... };\n method2: function() { ... } // My.cool.Class.method2 = function() { ... };\n});\n
\nthis
\nBorrow another class' members to the prototype of this class.
\n\nExt.define('Bank', {\n money: '$$$',\n printMoney: function() {\n alert('$$$$$$$');\n }\n});\n\nExt.define('Thief', {\n ...\n});\n\nThief.borrow(Bank, ['money', 'printMoney']);\n\nvar steve = new Thief();\n\nalert(steve.money); // alerts '$$$'\nsteve.printMoney(); // alerts '$$$$$$$'\n
\nThe class to borrow members from
\nThe names of the members to borrow
\nthis
\nCreate a new instance of this Class.
\n\nExt.define('My.cool.Class', {\n ...\n});\n\nMy.cool.Class.create({\n someConfig: true\n});\n
\n\nAll parameters are passed to the constructor of the class.
\nthe created instance.
\nCreate aliases for existing prototype methods. Example:
\n\nExt.define('My.cool.Class', {\n method1: function() { ... },\n method2: function() { ... }\n});\n\nvar test = new My.cool.Class();\n\nMy.cool.Class.createAlias({\n method3: 'method1',\n method4: 'method2'\n});\n\ntest.method3(); // test.method1()\n\nMy.cool.Class.createAlias('method5', 'method3');\n\ntest.method5(); // test.method3() -> test.method1()\n
\nThe new method name, or an object to set multiple aliases. See\nflexSetter
\nThe original method name
\nGet the current class' name in string format.
\n\nExt.define('My.cool.Class', {\n constructor: function() {\n alert(this.self.getName()); // alerts 'My.cool.Class'\n }\n});\n\nMy.cool.Class.getName(); // 'My.cool.Class'\n
\nclassName
\nAdd methods / properties to the prototype of this class.
\n\nExt.define('My.awesome.Cat', {\n constructor: function() {\n ...\n }\n});\n\n My.awesome.Cat.implement({\n meow: function() {\n alert('Meowww...');\n }\n });\n\n var kitty = new My.awesome.Cat;\n kitty.meow();\n
\nOverride prototype members of this class. Overridden methods can be invoked via\ncallOverridden
\n\nExt.define('My.Cat', {\n constructor: function() {\n alert(\"I'm a cat!\");\n\n return this;\n }\n});\n\nMy.Cat.override({\n constructor: function() {\n alert(\"I'm going to be a cat!\");\n\n var instance = this.callOverridden();\n\n alert(\"Meeeeoooowwww\");\n\n return instance;\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
\nthis
\nwill be removed in Ext JS 5.0. This is just a copy of this.rawData - use that instead
\n","version":null},"static":false,"owner":"Ext.data.reader.Json","template":null,"required":null,"protected":false,"name":"jsonData","id":"property-jsonData"},{"tagname":"property","deprecated":null,"static":false,"owner":"Ext.data.reader.Reader","template":null,"required":null,"protected":false,"name":"rawData","id":"property-rawData"},{"tagname":"property","deprecated":null,"static":false,"owner":"Ext.Base","template":null,"required":null,"protected":true,"name":"self","id":"property-self"}],"css_var":[],"css_mixin":[],"cfg":[{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.data.reader.Reader","template":null,"required":false,"protected":false,"name":"idProperty","id":"cfg-idProperty"},{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.data.reader.Reader","template":null,"required":false,"protected":false,"name":"implicitIncludes","id":"cfg-implicitIncludes"},{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.data.reader.Reader","template":null,"required":false,"protected":false,"name":"messageProperty","id":"cfg-messageProperty"},{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.data.reader.Json","template":null,"required":false,"protected":false,"name":"record","id":"cfg-record"},{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.data.reader.Reader","template":null,"required":false,"protected":false,"name":"root","id":"cfg-root"},{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.data.reader.Reader","template":null,"required":false,"protected":false,"name":"successProperty","id":"cfg-successProperty"},{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.data.reader.Reader","template":null,"required":false,"protected":false,"name":"totalProperty","id":"cfg-totalProperty"},{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.data.reader.Json","template":null,"required":false,"protected":false,"name":"useSimpleAccessors","id":"cfg-useSimpleAccessors"}],"method":[{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.data.reader.Reader","template":false,"required":null,"protected":false,"name":"constructor","id":"method-constructor"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.Base","template":false,"required":null,"protected":true,"name":"callOverridden","id":"method-callOverridden"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.Base","template":false,"required":null,"protected":true,"name":"callParent","id":"method-callParent"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.data.reader.Reader","template":false,"required":null,"protected":false,"name":"getResponseData","id":"method-getResponseData"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.Base","template":false,"required":null,"protected":true,"name":"initConfig","id":"method-initConfig"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.data.reader.Reader","template":false,"required":null,"protected":false,"name":"read","id":"method-read"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.data.reader.Json","template":false,"required":null,"protected":false,"name":"readRecords","id":"method-readRecords"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.Base","template":false,"required":null,"protected":true,"name":"statics","id":"method-statics"}],"event":[]},"private":false,"component":false,"name":"Ext.data.reader.Json","alternateClassNames":["Ext.data.JsonReader"],"id":"class-Ext.data.reader.Json","mixedInto":[],"xtypes":{"reader":["json"]},"files":[{"href":"Json.html#Ext-data-reader-Json","filename":"Json.js"}]}); \ No newline at end of file