X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/0494b8d9b9bb03ab6c22b34dae81261e3cd7e3e6..7a654f8d43fdb43d78b63d90528bed6e86b608cc:/docs/api/Ext.data.writer.Xml.html diff --git a/docs/api/Ext.data.writer.Xml.html b/docs/api/Ext.data.writer.Xml.html new file mode 100644 index 00000000..55600495 --- /dev/null +++ b/docs/api/Ext.data.writer.Xml.html @@ -0,0 +1,110 @@ +Ext.data.writer.Xml | Ext JS 4.0 Documentation +
For up to date documentation and features, visit +http://docs.sencha.com/ext-js/4-0

Sencha Documentation

+ + + + + +

Hierarchy

Ext.data.writer.Writer
Ext.data.writer.Xml

Writer that outputs model data in XML format

+ +
Defined By

Config Options

Other Configs

 

The root to be used if documentRoot is empty and a root is required +to form a valid XML document.

+

The root to be used if documentRoot is empty and a root is required +to form a valid XML document.

+
 
The name of the root element of the document. Defaults to 'xmlData'. +If there is more than 1 record and the root is n...

The name of the root element of the document. Defaults to 'xmlData'. +If there is more than 1 record and the root is not specified, the default document root will still be used +to ensure a valid XML document is created.

+
 

A header to use in the XML document (such as setting the encoding or version). +Defaults to ''.

+

A header to use in the XML document (such as setting the encoding or version). +Defaults to ''.

+
 
This property is used to read the key for each value that will be sent to the server. +For example: + +Ext.define('Perso...

This property is used to read the key for each value that will be sent to the server. +For example:

+ +
Ext.define('Person', {
+    extend: 'Ext.data.Model',
+    fields: [{
+        name: 'first',
+        mapping: 'firstName'
+    }, {
+        name: 'last',
+        mapping: 'lastName'
+    }, {
+        name: 'age'
+    }]
+});
+new Ext.data.writer.Writer({
+    writeAllFields: true,
+    nameProperty: 'mapping'
+});
+
+// This will be sent to the server
+{
+    firstName: 'first name value',
+    lastName: 'last name value',
+    age: 1
+}
+
+
+ + +

Defaults to name. If the value is not present, the field name will always be used.

+
 

The name of the node to use for each record. Defaults to 'record'.

+

The name of the node to use for each record. Defaults to 'record'.

+
 
True to write all fields from the record to the server. If set to false it +will only send the fields that were modifi...

True to write all fields from the record to the server. If set to false it +will only send the fields that were modified. Defaults to true. Note that any fields that have +Ext.data.Field.persist set to false will still be ignored.

+
Defined By

Methods

 
Xml( +Object config) + : void

 

+

Parameters

  • config : Object

    Optional config object

    +

Returns

  • void    +
 
Formats the data for each record before sending it to the server. This +method should be overridden to format the data...

Formats the data for each record before sending it to the server. This +method should be overridden to format the data in a way that differs from the default.

+

Parameters

  • record : Object

    The record that we are writing to the server.

    +

Returns

  • Object   

    An object literal of name/value keys to be written to the server. +By default this method returns the data property on the record.

    +
 
write( +Ext.data.Request request) + : Ext.data.Request

Prepares a Proxy's Ext.data.Request object

+

Prepares a Proxy's Ext.data.Request object

+

Parameters

  • request : Ext.data.Request

    The request object

    +

Returns

  • Ext.data.Request   

    The modified request object

    +
\ No newline at end of file