DataWriter extension for writing an array or single
Ext.data.Record object(s) in preparation for executing a remote CRUD action via XML.
Config Options
|
| createRecord : Function | DataWriter |
| destroyRecord : Function | DataWriter |
| listful : Boolean | DataWriter |
| listful : Booleanfalse by default. Set true to have the DataWriter always write HTTP params as a list,
even when acting upon a single... false by default. Set true to have the DataWriter always write HTTP params as a list,
-even when acting upon a single record. | DataWriter |
| saveRecord : Function | DataWriter |
| writeAllFields : Booleanfalse by default. Set true to have DataWriter return ALL fields of a modified
+even when acting upon a single record. | DataWriter |
| root : String[records] The name of the root element when writing multiple records to the server. Each
+xml-record written to the s... [records] The name of the root element when writing multiple records to the server. Each
+xml-record written to the server will be wrapped in an element named after Ext.data.XmlReader.record property.
+eg:
+
+<?xml version="1.0" encoding="UTF-8"?>
+<user><first>Barney</first></user>
+However, when multiple records are written in a batch-operation, these records must be wrapped in a containing
+Element.
+eg:
+
+<?xml version="1.0" encoding="UTF-8"?>
+ <records>
+ <first>Barney</first></user>
+ <records><first>Barney</first></user>
+ </records>
+Defaults to records | XmlWriter |
| tpl : StringThe xml template. Defaults to
+
+<?xml version="{version}" encoding="{encoding}"?>
+ <tpl if="{[values.nodes.l... The xml template. Defaults to
+
+<?xml version="{version}" encoding="{encoding}"?>
+ <tpl if="{[values.nodes.length>1]}"><{root}}>',
+ <tpl for="records">
+ <{parent.record}>
+ <tpl for="fields">
+ <{name}>{value}</{name}>
+ </tpl>
+ </{parent.record}>
+ </tpl>
+ <tpl if="{[values.records.length>1]}"></{root}}></tpl>
+
| XmlWriter |
| updateRecord : Function | DataWriter |
| writeAllFields : Booleanfalse by default. Set true to have DataWriter return ALL fields of a modified
record -- not just those that changed.... false by default. Set true to have DataWriter return ALL fields of a modified
record -- not just those that changed.
-false to have DataWriter only request modified fields from a record. | DataWriter |
Public Properties
|
| meta : Mixed This DataWriter's configured metadata as passed to the constructor. | DataWriter |
Public Methods
|
| createRecord( Ext.data.Record rec )
- :
- void | XmlWriter |
| destroyRecord( Ext.data.Record rec )
- :
- void | XmlWriter |
| render( String action , Record[] rs , Object http , Object data )
- :
- voidFinal action of a write event. Apply the written data-object to params. Final action of a write event. Apply the written data-object to params. | XmlWriter |
| updateRecord( Ext.data.Record rec )
- :
- void | XmlWriter |
| write( String action , Object params , Record/Record[] rs )
- :
- voidWrites data in preparation for server-write action. Simply proxies to DataWriter#update, DataWriter#create
+false to have DataWriter only request modified fields from a record. | DataWriter |
| xmlEncoding : String[ISO-8859-15] The encoding written to header of xml documents.
+ <?xml version="1.0" encoding="ISO-8859-15"?>
| XmlWriter |
| xmlVersion : String[1.0] The version written to header of xml documents.
+ <?xml version="1.0" encoding="ISO-8859-15"?>
| XmlWriter |
Public Properties
This class has no public properties.
Public Methods
|
| destroyRecord( Ext.data.Record rec )
+ :
+ String | XmlWriter |
| render( String action , Ext.data.Record/Ext.data.Record[] rs , Object http , Object/Object[] rendered )
+ :
+ voidFinal action of a write event. Apply the written data-object to params. Final action of a write event. Apply the written data-object to params. | XmlWriter |
| write( String action , Object params , Record/Record[] rs )
+ :
+ voidWrites data in preparation for server-write action. Simply proxies to DataWriter#update, DataWriter#create
DataWrite... Writes data in preparation for server-write action. Simply proxies to DataWriter#update, DataWriter#create
DataWriter#destroy. | DataWriter |
Public Events
This class has no public events.