javascript - How I'll create a model from json file? (ExtJS) -
this model want create using json file
ext.define('users', { extend: 'ext.data.model', fields: [{name: 'user_id', type: 'int'}, {name: 'user_name', type: 'string'}] });
what have in order automatically create model, based on content of json response server?
in order have model created automatically, need include metadata
field json data. metadata
can used describe of fields model.
in extjs 4.1 documentation - ext.data.reader.json has section called response metadata describes basic use of feature.
Comments
Post a Comment