Class type Ext_data_writer_Writer.configs


class type configs = object .. end
Inherits
method dateFormat : Js.js_string Js.t Js.prop

This is used for each field of type date in the model to format the value before it is sent to the server.


method nameProperty : Js.js_string Js.t Js.prop

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
}

If the value is not present, the field name will always be used.

Defaults to: 'name'

method writeAllFields : bool Js.t Js.prop

True to write all fields from the record to the server. If set to false it will only send the fields that were modified. Note that any fields that have Ext.data.Field.persist set to false will still be ignored.

Defaults to: true

method writeRecordId : bool Js.t Js.prop

By default, each record's id is always included in the output for non-phantom records since in most cases the id will be required on the server to process the record action. This is helpful since the id will normally not be modified, and so would not be sent to the server unless writeAllFields was explicitly enabled.

However, there are cases where it is not desirable for the record id to be passed in the data directly. For example, when using a RESTful API the record id would typically be appended to the url instead.

Defaults to: true