Upgrade to ExtJS 4.0.2 - Released 06/09/2011
[extjs.git] / docs / output / Ext.data.writer.Writer.js
1 Ext.data.JsonP.Ext_data_writer_Writer({
2   "allMixins": [
3
4   ],
5   "deprecated": null,
6   "docauthor": null,
7   "members": {
8     "cfg": [
9       {
10         "type": "String",
11         "deprecated": null,
12         "alias": null,
13         "protected": false,
14         "tagname": "cfg",
15         "href": "Writer.html#Ext-data-writer-Writer-cfg-nameProperty",
16         "shortDoc": "This property is used to read the key for each value that will be sent to the server. ...",
17         "static": false,
18         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/data/writer/Writer.js",
19         "private": false,
20         "name": "nameProperty",
21         "owner": "Ext.data.writer.Writer",
22         "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",
23         "linenr": 29,
24         "html_filename": "Writer.html"
25       },
26       {
27         "type": "Boolean",
28         "deprecated": null,
29         "alias": null,
30         "protected": false,
31         "tagname": "cfg",
32         "href": "Writer.html#Ext-data-writer-Writer-cfg-writeAllFields",
33         "shortDoc": "True to write all fields from the record to the server. ...",
34         "static": false,
35         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/data/writer/Writer.js",
36         "private": false,
37         "name": "writeAllFields",
38         "owner": "Ext.data.writer.Writer",
39         "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",
40         "linenr": 22,
41         "html_filename": "Writer.html"
42       }
43     ],
44     "method": [
45       {
46         "deprecated": null,
47         "alias": null,
48         "href": "Writer.html#Ext-data-writer-Writer-method-constructor",
49         "tagname": "method",
50         "protected": false,
51         "shortDoc": "Creates new Writer. ...",
52         "static": false,
53         "params": [
54           {
55             "type": "Object",
56             "optional": true,
57             "doc": "<p>(optional) Config object.</p>\n",
58             "name": "config"
59           }
60         ],
61         "private": false,
62         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/data/writer/Writer.js",
63         "doc": "<p>Creates new Writer.</p>\n",
64         "owner": "Ext.data.writer.Writer",
65         "name": "Writer",
66         "html_filename": "Writer.html",
67         "return": {
68           "type": "Object",
69           "doc": "\n"
70         },
71         "linenr": 62
72       },
73       {
74         "deprecated": null,
75         "alias": null,
76         "protected": false,
77         "tagname": "method",
78         "href": "Writer.html#Ext-data-writer-Writer-method-getRecordData",
79         "shortDoc": "Formats the data for each record before sending it to the server. ...",
80         "static": false,
81         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/data/writer/Writer.js",
82         "private": false,
83         "params": [
84           {
85             "type": "Object",
86             "optional": false,
87             "doc": "<p>The record that we are writing to the server.</p>\n",
88             "name": "record"
89           }
90         ],
91         "name": "getRecordData",
92         "owner": "Ext.data.writer.Writer",
93         "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",
94         "linenr": 88,
95         "return": {
96           "type": "Object",
97           "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"
98         },
99         "html_filename": "Writer.html"
100       },
101       {
102         "deprecated": null,
103         "alias": null,
104         "protected": false,
105         "tagname": "method",
106         "href": "Writer.html#Ext-data-writer-Writer-method-write",
107         "shortDoc": "Prepares a Proxy's Ext.data.Request object ...",
108         "static": false,
109         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/data/writer/Writer.js",
110         "private": false,
111         "params": [
112           {
113             "type": "Ext.data.Request",
114             "optional": false,
115             "doc": "<p>The request object</p>\n",
116             "name": "request"
117           }
118         ],
119         "name": "write",
120         "owner": "Ext.data.writer.Writer",
121         "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",
122         "linenr": 70,
123         "return": {
124           "type": "Ext.data.Request",
125           "doc": "<p>The modified request object</p>\n"
126         },
127         "html_filename": "Writer.html"
128       }
129     ],
130     "property": [
131
132     ],
133     "cssVar": [
134
135     ],
136     "cssMixin": [
137
138     ],
139     "event": [
140
141     ]
142   },
143   "singleton": false,
144   "alias": null,
145   "superclasses": [
146
147   ],
148   "protected": false,
149   "tagname": "class",
150   "mixins": [
151
152   ],
153   "href": "Writer.html#Ext-data-writer-Writer",
154   "subclasses": [
155     "Ext.data.writer.Xml",
156     "Ext.data.writer.Json"
157   ],
158   "static": false,
159   "author": "Ed Spencer",
160   "component": false,
161   "filename": "/mnt/ebs/nightly/git/SDK/platform/src/data/writer/Writer.js",
162   "private": false,
163   "alternateClassNames": [
164     "Ext.data.DataWriter",
165     "Ext.data.Writer"
166   ],
167   "name": "Ext.data.writer.Writer",
168   "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",
169   "mixedInto": [
170
171   ],
172   "linenr": 1,
173   "xtypes": [
174
175   ],
176   "html_filename": "Writer.html",
177   "extends": "Object"
178 });