Clear Up
SharpKit Reference

ModelConfig Class

Namespace: Ext.data

Base Types

System.Object

Constructors

Name Description
ModelConfig()

Properties

Name Description
associations An array of {@link Ext.data.Association associations} for this model.
belongsTo One or more {@link Ext.data.BelongsToAssociation BelongsTo associations} for this model.
defaultProxyType The string type of the default Model Proxy. Defaults to 'ajax'.
fields The fields for this model.
hasMany One or more {@link Ext.data.HasManyAssociation HasMany associations} for this model.
idgen The id generator to use for this model. The default id generator does not generate values for the {@link #idProperty}. * This can be overridden at the model level to provide a custom generator for a model. The simplest form of this would be: * Ext.define('MyApp.data.MyModel', { extend: 'Ext.data.Model', requires: ['Ext.data.SequentialIdGenerator'], idgen: 'sequential', ... }); * The above would generate {@link Ext.data.SequentialIdGenerator sequential} id's such as 1, 2, 3 etc.. * Another useful id generator is {@link Ext.data.UuidGenerator}: * Ext.define('MyApp.data.MyModel', { extend: 'Ext.data.Model', requires: ['Ext.data.UuidGenerator'], idgen: 'uuid', ... }); * An id generation can also be further configured: * Ext.define('MyApp.data.MyModel', { extend: 'Ext.data.Model', idgen: { type: 'sequential', seed: 1000, prefix: 'ID_' } }); * The above would generate id's such as ID_1000, ID_1001, ID_1002 etc.. * If multiple models share an id space, a single generator can be shared: * Ext.define('MyApp.data.MyModelX', { extend: 'Ext.data.Model', idgen: { type: 'sequential', id: 'xy' } }); * Ext.define('MyApp.data.MyModelY', { extend: 'Ext.data.Model', idgen: { type: 'sequential', id: 'xy' } }); * For more complex, shared id generators, a custom generator is the best approach. See {@link Ext.data.IdGenerator} for details on creating custom id generators. * @markdown
idProperty The name of the field treated as this Model's unique id. Defaults to 'id'.
validations An array of {@link Ext.data.validations validations} for this model.
© Copyright 2005-2011 SharpKit. All rights reserved.