X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/d41dc04ad17d1d9125fb2cf72db2b4782dbe3a8c..c8256059947f3aa8f5b0a9a2acf55e2142bb4742:/docs/output/Ext.data.XmlReader.html diff --git a/docs/output/Ext.data.XmlReader.html b/docs/output/Ext.data.XmlReader.html index f4330917..54ff5ffe 100644 --- a/docs/output/Ext.data.XmlReader.html +++ b/docs/output/Ext.data.XmlReader.html @@ -1,38 +1,17 @@ -
DataReader - XmlReader
Package: | Ext.data |
Defined In: | XmlReader.js |
Class: | XmlReader |
Extends: | DataReader |
-Note that in order for the browser to parse a returned XML document, the Content-Type -header in the HTTP response must be set to "text/xml" or "application/xml". -
-Example code: -
var Employee = Ext.data.Record.create([
- {name: 'name', mapping: 'name'}, // "mapping" property not needed if it's the same as "name"
+DataReader
XmlReader
Class Ext.data.XmlReader
Package: Ext.data Defined In: XmlReader.js Class: XmlReader Extends: DataReader
Data reader class to create an Array of Ext.data.Record objects from an XML document
+based on mappings in a provided Ext.data.Record constructor.
+Note: that in order for the browser to parse a returned XML document, the Content-Type
+header in the HTTP response must be set to "text/xml" or "application/xml".
+Example code:
+var Employee = Ext.data.Record.create([
+ {name: 'name', mapping: 'name'}, // "mapping" property not needed if it is the same as "name"
{name: 'occupation'} // This field will use "occupation" as the mapping.
]);
var myReader = new Ext.data.XmlReader({
- totalRecords: "results", // The element which contains the total dataset size (optional)
+ totalProperty: "results", // The element which contains the total dataset size (optional)
record: "row", // The repeated element which contains row information
- id: "id" // The element within the row that provides an ID for the record (optional)
+ idProperty: "id" // The element within the row that provides an ID for the record (optional)
+ messageProperty: "msg" // The element within the response that provides a user-feedback message (optional)
}, Employee);
This would consume an XML file like this:
@@ -49,153 +28,39 @@ This would consume an XML file like this:
<name>Ben</name>
<occupation>Horticulturalist</occupation>
</row>
-</dataset>
-
-
-
- Config Options
-
- Public Properties
-
-
- Property
- Defined By
-
-
-
-
-
- meta : Mixed
- This DataReader's configured metadata as passed to the constructor.
-
- DataReader
-
-
-
-
-
- xmlData : XMLDocument
- After any data loads/reads, the raw XML Document is available for further custom processing.
-
- XmlReader
-
-
-
- Public Methods
-
-
- Method
- Defined By
-
-
-
-
-
- XmlReader( Object meta
, Object recordType
)
- Create a new XmlReader.
-
- Create a new XmlReader.
- Parameters:
- meta
: ObjectMetadata configuration optionsrecordType
: ObjectEither an Array of field definition objects as passed to
-Ext.data.Record.create, or a Record constructor object created using Ext.data.Record.create.
- Returns:
-
-
-
-
-
-
-
- XmlReader
-
-
-
-
-
- read( Object response
) : Object
- This method is only used by a DataProxy which has retrieved data from a remote server.
-
- This method is only used by a DataProxy which has retrieved data from a remote server.
- Parameters:
- response
: ObjectThe XHR object which contains the parsed XML document. The response is expected
-to contain a property called responseXML which refers to an XML document object.
- Returns:
-
- Object
records A data block which is used by an {@link Ext.data.Store} as a cache of Ext.data.Records.
-
-
-
-
-
- XmlReader
-
-
-
-
-
- readRecords( Object doc
) : Object
- Create a data block containing Ext.data.Records from an XML document.
-
- Create a data block containing Ext.data.Records from an XML document.
- Parameters:
- doc
: ObjectA parsed XML document.
- Returns:
-
- Object
records A data block which is used by an {@link Ext.data.Store} as a cache of Ext.data.Records.
-
-
-
-
-
- XmlReader
-
-
-
- Public Events
- This class has no public events.
-
\ No newline at end of file
+</dataset>
Config Options | Defined By | |
---|---|---|
fields : Array/Object Either an Array of Field definition objects (which
+will be passed to Ext.data.Record.create, or a Record
+constructor ... Either an Array of Field definition objects (which +will be passed to Ext.data.Record.create, or a Record +constructor created from Ext.data.Record.create. | DataReader | |
idPath : String The DomQuery path relative from the record element to the element that contains
+a record identifier value. | XmlReader | |
messageProperty : String [undefined] Optional name of a property within a server-response that represents a user-feedback message. | DataReader | |
record : String The DomQuery path to the repeated element which contains record information. | XmlReader | |
record : String The DomQuery path to the repeated element which contains record information. | XmlReader | |
successProperty : String The DomQuery path to the success attribute used by forms. | XmlReader | |
totalProperty : String The DomQuery path from which to retrieve the total number of records
+in the dataset. This is only needed if the whole... The DomQuery path from which to retrieve the total number of records
+in the dataset. This is only needed if the whole dataset is not passed in one go, but is being
+paged from the remote server. | XmlReader |
Property | Defined By | |
---|---|---|
buildExtractors : Object Abstract method, overridden in DataReader extensions such as Ext.data.JsonReader and Ext.data.XmlReader | DataReader | |
extractValues : Object Abstract method overridden in DataReader extensions such as Ext.data.JsonReader and Ext.data.XmlReader | DataReader | |
getId : Object Abstract method created in extension's buildExtractors impl. | DataReader | |
getMessage : Object Abstract method created in extension's buildExtractors impl. | DataReader | |
getRoot : Object Abstract method created in extension's buildExtractors impl. | DataReader | |
getSuccess : Object Abstract method created in extension's buildExtractors impl. | DataReader | |
getTotal : Object Abstract method created in extension's buildExtractors impl. | DataReader | |
meta : Mixed This DataReader's configured metadata as passed to the constructor. | DataReader | |
xmlData : XMLDocument After any data loads/reads, the raw XML Document is available for further custom processing. | XmlReader |
Method | Defined By | |
---|---|---|
XmlReader( Object meta , Object recordType )
+ Create a new XmlReader. Create a new XmlReader. Parameters:
| XmlReader | |
isData( Object data )
+ :
+ BooleanReturns true if the supplied data-hash looks and quacks like data. Checks to see if it has a key
+corresponding to id... Returns true if the supplied data-hash looks and quacks like data. Checks to see if it has a key
+corresponding to idProperty defined in your DataReader config containing non-empty pk. Parameters:
| DataReader | |
read( Object response )
+ :
+ ObjectThis method is only used by a DataProxy which has retrieved data from a remote server. This method is only used by a DataProxy which has retrieved data from a remote server. Parameters:
| XmlReader | |
readRecords( Object doc )
+ :
+ ObjectCreate a data block containing Ext.data.Records from an XML document. Create a data block containing Ext.data.Records from an XML document. Parameters:
| XmlReader | |
readResponse( String action , Object response )
+ :
+ Ext.data.ResponseDecode an XML response from server. Decode an XML response from server. Parameters:
| XmlReader | |
realize( Record/Record[] record , Object/Object[] data )
+ :
+ voidUsed for un-phantoming a record after a successful database insert. Sets the records pk along with new data from ser... Used for un-phantoming a record after a successful database insert. Sets the records pk along with new data from server.
+You must return at least the database pk using the idProperty defined in your DataReader configuration. The incoming
+data from server will be merged with the data in the local record.
+In addition, you must return record-data from the server in the same order received.
+Will perform a commit as well, un-marking dirty-fields. Store's "update" event will be suppressed. Parameters:
| DataReader | |
update( Record/Record[] rs , Object/Object[] data )
+ :
+ voidUsed for updating a non-phantom or "real" record's data with fresh data from server after remote-save.
+If returning d... Used for updating a non-phantom or "real" record's data with fresh data from server after remote-save.
+If returning data from multiple-records after a batch-update, you must return record-data from the server in
+the same order received. Will perform a commit as well, un-marking dirty-fields. Store's "update" event will be
+suppressed as the record receives fresh new data-hash Parameters:
| DataReader |