class type statics =Inheritsobject..end
method _COMMIT : Js.js_string Js.t Js.propThe update operation of type 'commit'. Used by Store.update event.
Defaults to: 'commit'
method _EDIT : Js.js_string Js.t Js.propThe update operation of type 'edit'. Used by Store.update event.
Defaults to: 'edit'
method _REJECT : Js.js_string Js.t Js.propThe update operation of type 'reject'. Used by Store.update event.
Defaults to: 'reject'
method getFields : Ext_data_Field.t Js.js_array Js.t Js.methReturns an Array of Field definitions which define this Model's structure
Fields are sorted upon Model class definition. Fields with custom convert functions are moved to after fields with no convert functions. This is so that convert functions which rely on existing field values will be able to read those field values.
Returns:
Ext_data_Field.t Js.js_array Js.t
The defined Fields for this Model.
method getProxy : 'a. 'a Js.t Js.methReturns the configured Proxy for this Model
Returns:
#Ext_data_proxy_Proxy.t Js.t The proxy
method id : 'b. 'b Js.t -> Js.js_string Js.t Js.methGenerates a sequential id. This method is typically called when a record is created and no id has been specified either as a parameter, or through the idProperty in the passed data. The generated id will automatically be assigned to the record. The returned id takes the form: {PREFIX}-{AUTO_ID}.
Parameters:
Ext_data_Model.t Js.t
The record being created. The record does not exist, it's a phantom.
Returns:
Js.js_string Js.t
auto-generated string id, "ext-record-i++";
method load : 'c 'd. 'c Js.t -> 'd Js.t Js.optdef -> unit Js.methAsynchronously loads a model instance by id. Sample usage:
Ext.define('MyApp.User', {
extend: 'Ext.data.Model',
fields: [
{name: 'id', type: 'int'},
{name: 'name', type: 'string'}
]
});
MyApp.User.load(10, {
scope: this,
failure: function(record, operation) {
//do something if the load failed
//record is null
},
success: function(record, operation) {
//do something if the load succeeded
},
callback: function(record, operation, success) {
//do something whether the load succeeded or failed
//if operation is unsuccessful, record is null
}
});
Parameters:
_ Js.t
The id of the model to load
_ Js.t (optional)
config object containing success, failure and callback functions, plus optional scope
method setFields : 'e 'f 'g. 'e Js.t -> 'f Js.t -> 'g Js.t -> unit Js.methApply a new set of field and/or property definitions to the existing model. This will replace any existing fields, including fields inherited from superclasses. Mainly for reconfiguring the model based on changes in meta data (called from Reader's onMetaChange method).
Parameters:
_ Js.t
_ Js.t
_ Js.t
method setProxy : 'h 'i. 'h Js.t -> 'i Js.t Js.methSets the Proxy to use for this model. Accepts any options that can be accepted by Ext.createByAlias.
Parameters:
_ Js.t The proxy