X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6a7e4474cba9d8be4b2ec445e10f1691f7277c50..7a654f8d43fdb43d78b63d90528bed6e86b608cc:/docs/api/Ext.data.writer.Writer.html diff --git a/docs/api/Ext.data.writer.Writer.html b/docs/api/Ext.data.writer.Writer.html new file mode 100644 index 00000000..3c8ac54b --- /dev/null +++ b/docs/api/Ext.data.writer.Writer.html @@ -0,0 +1,112 @@ +
Base Writer class used by most subclasses of Ext.data.proxy.Server. This class is +responsible for taking a set of Ext.data.Operation objects and a Ext.data.Request +object and modifying that request based on the Operations.
+ + + + +For example a Ext.data.writer.Json would format the Operations and their Ext.data.Model +instances based on the config options passed to the JsonWriter's constructor.
+ + + + +Writers are not needed for any kind of local storage - whether via a +Web Storage proxy (see localStorage +and sessionStorage) or just in memory via a +MemoryProxy.
+ +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.
+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.
+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.
+The record that we are writing to the server.
+An object literal of name/value keys to be written to the server. +By default this method returns the data property on the record.
+Prepares a Proxy's Ext.data.Request object
+Prepares a Proxy's Ext.data.Request object
+The request object
+The modified request object
+