Upgrade to ExtJS 4.0.1 - Released 05/18/2011
[extjs.git] / docs / output / Ext.data.writer.Writer.js
1 Ext.data.JsonP.Ext_data_writer_Writer({
2   "tagname": "class",
3   "name": "Ext.data.writer.Writer",
4   "doc": "<p>Base Writer class used by most subclasses of <a href=\"#/api/Ext.data.proxy.Server\" rel=\"Ext.data.proxy.Server\" class=\"docClass\">Ext.data.proxy.Server</a>. This class is\nresponsible for taking a set of <a href=\"#/api/Ext.data.Operation\" rel=\"Ext.data.Operation\" class=\"docClass\">Ext.data.Operation</a> objects and a <a href=\"#/api/Ext.data.Request\" rel=\"Ext.data.Request\" class=\"docClass\">Ext.data.Request</a>\nobject and modifying that request based on the Operations.</p>\n\n\n\n\n<p>For example a <a href=\"#/api/Ext.data.writer.Json\" rel=\"Ext.data.writer.Json\" class=\"docClass\">Ext.data.writer.Json</a> would format the Operations and their <a href=\"#/api/Ext.data.Model\" rel=\"Ext.data.Model\" class=\"docClass\">Ext.data.Model</a> \ninstances based on the config options passed to the JsonWriter's constructor.</p>\n\n\n\n\n<p>Writers are not needed for any kind of local storage - whether via a\n<a href=\"#/api/Ext.data.proxy.WebStorage\" rel=\"Ext.data.proxy.WebStorage\" class=\"docClass\">Web Storage proxy</a> (see <a href=\"#/api/Ext.data.proxy.LocalStorage\" rel=\"Ext.data.proxy.LocalStorage\" class=\"docClass\">localStorage</a>\nand <a href=\"#/api/Ext.data.proxy.SessionStorage\" rel=\"Ext.data.proxy.SessionStorage\" class=\"docClass\">sessionStorage</a>) or just in memory via a\n<a href=\"#/api/Ext.data.proxy.Memory\" rel=\"Ext.data.proxy.Memory\" class=\"docClass\">MemoryProxy</a>.</p>\n\n",
5   "extends": "Object",
6   "mixins": [
7
8   ],
9   "alternateClassNames": [
10     "Ext.data.DataWriter",
11     "Ext.data.Writer"
12   ],
13   "xtype": null,
14   "author": "Ed Spencer",
15   "docauthor": null,
16   "singleton": false,
17   "private": false,
18   "cfg": [
19     {
20       "tagname": "cfg",
21       "name": "nameProperty",
22       "member": "Ext.data.writer.Writer",
23       "type": "String",
24       "doc": "<p>This property is used to read the key for each value that will be sent to the server.\nFor example:</p>\n\n<pre><code>Ext.define('Person', {\n    extend: 'Ext.data.Model',\n    fields: [{\n        name: 'first',\n        mapping: 'firstName'\n    }, {\n        name: 'last',\n        mapping: 'lastName'\n    }, {\n        name: 'age'\n    }]\n});\nnew Ext.data.writer.Writer({\n    writeAllFields: true,\n    nameProperty: 'mapping'\n});\n\n// This will be sent to the server\n{\n    firstName: 'first name value',\n    lastName: 'last name value',\n    age: 1\n}\n\n</code></pre>\n\n\n<p>Defaults to <tt>name</tt>. If the value is not present, the field name will always be used.</p>\n",
25       "private": false,
26       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/data/writer/Writer.js",
27       "linenr": 32,
28       "html_filename": "Writer.html",
29       "href": "Writer.html#Ext-data-writer-Writer-cfg-nameProperty",
30       "shortDoc": "This property is used to read the key for each value that will be sent to the server.\nFor example:\n\nExt.define('Perso..."
31     },
32     {
33       "tagname": "cfg",
34       "name": "writeAllFields",
35       "member": "Ext.data.writer.Writer",
36       "type": "Boolean",
37       "doc": "<p>True to write all fields from the record to the server. If set to false it\nwill only send the fields that were modified. Defaults to <tt>true</tt>. Note that any fields that have\n<a href=\"#/api/Ext.data.Field-cfg-persist\" rel=\"Ext.data.Field-cfg-persist\" class=\"docClass\">Ext.data.Field.persist</a> set to false will still be ignored.</p>\n",
38       "private": false,
39       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/data/writer/Writer.js",
40       "linenr": 25,
41       "html_filename": "Writer.html",
42       "href": "Writer.html#Ext-data-writer-Writer-cfg-writeAllFields",
43       "shortDoc": "True to write all fields from the record to the server. If set to false it\nwill only send the fields that were modifi..."
44     }
45   ],
46   "method": [
47     {
48       "tagname": "method",
49       "name": "Writer",
50       "member": "Ext.data.writer.Writer",
51       "doc": "\n",
52       "params": [
53         {
54           "type": "Object",
55           "name": "config",
56           "doc": "<p>Optional config object</p>\n",
57           "optional": false
58         }
59       ],
60       "return": {
61         "type": "void",
62         "doc": "\n"
63       },
64       "private": false,
65       "static": false,
66       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/data/writer/Writer.js",
67       "linenr": 1,
68       "html_filename": "Writer.html",
69       "href": "Writer.html#Ext-data-writer-Writer-method-constructor",
70       "shortDoc": "\n"
71     },
72     {
73       "tagname": "method",
74       "name": "getRecordData",
75       "member": "Ext.data.writer.Writer",
76       "doc": "<p>Formats the data for each record before sending it to the server. This\nmethod should be overridden to format the data in a way that differs from the default.</p>\n",
77       "params": [
78         {
79           "type": "Object",
80           "name": "record",
81           "doc": "<p>The record that we are writing to the server.</p>\n",
82           "optional": false
83         }
84       ],
85       "return": {
86         "type": "Object",
87         "doc": "<p>An object literal of name/value keys to be written to the server.\nBy default this method returns the data property on the record.</p>\n"
88       },
89       "private": false,
90       "static": false,
91       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/data/writer/Writer.js",
92       "linenr": 87,
93       "html_filename": "Writer.html",
94       "href": "Writer.html#Ext-data-writer-Writer-method-getRecordData",
95       "shortDoc": "Formats the data for each record before sending it to the server. This\nmethod should be overridden to format the data..."
96     },
97     {
98       "tagname": "method",
99       "name": "write",
100       "member": "Ext.data.writer.Writer",
101       "doc": "<p>Prepares a Proxy's <a href=\"#/api/Ext.data.Request\" rel=\"Ext.data.Request\" class=\"docClass\">Ext.data.Request</a> object</p>\n",
102       "params": [
103         {
104           "type": "Ext.data.Request",
105           "name": "request",
106           "doc": "<p>The request object</p>\n",
107           "optional": false
108         }
109       ],
110       "return": {
111         "type": "Ext.data.Request",
112         "doc": "<p>The modified request object</p>\n"
113       },
114       "private": false,
115       "static": false,
116       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/data/writer/Writer.js",
117       "linenr": 69,
118       "html_filename": "Writer.html",
119       "href": "Writer.html#Ext-data-writer-Writer-method-write",
120       "shortDoc": "<p>Prepares a Proxy's <a href=\"#/api/Ext.data.Request\" rel=\"Ext.data.Request\" class=\"docClass\">Ext.data.Request</a> object</p>\n"
121     }
122   ],
123   "property": [
124
125   ],
126   "event": [
127
128   ],
129   "filename": "/Users/nick/Projects/sencha/SDK/platform/src/data/writer/Writer.js",
130   "linenr": 1,
131   "html_filename": "Writer.html",
132   "href": "Writer.html#Ext-data-writer-Writer",
133   "cssVar": [
134
135   ],
136   "cssMixin": [
137
138   ],
139   "component": false,
140   "superclasses": [
141
142   ],
143   "subclasses": [
144     "Ext.data.writer.Json",
145     "Ext.data.writer.Xml"
146   ],
147   "mixedInto": [
148
149   ],
150   "allMixins": [
151
152   ]
153 });