Package: | Ext.data |
Defined In: | Writer.js |
Class: | Writer |
Subclasses: | JsonWriter, XmlWriter |
Extends: | Object |
Base Writer class used by most subclasses of Ext.data.ServerProxy. 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.JsonWriter 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.
Method | Defined By | |
---|---|---|
Writer( Object config )
Parameters:
| Writer | |
getRecordData( Object record )
:
ObjectFormats 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:
| Writer | |
write( Ext.data.Request request )
:
Ext.data.RequestPrepares a Proxy's Ext.data.Request object Prepares a Proxy's Ext.data.Request object Parameters:
| Writer |