extjs - using alias in Ext.data.store for model -
can 1 me on issue?
i have created model , set alias name model , using same alias name in ext.data.store , set model alias name , doesn't work, complete name of model works. why?
ext.define('lancet.asset.system.combobox.models.pathwaymodel', { extend: 'lancet.def.system.model.model', alias: 'widget.pathwaymodel', fields: [ { name: 'id', type: 'string' }, { name: 'name', type: 'string' }, { name: 'group', type: 'string' } ] }); ext.create('ext.data.store', { model: 'lancet.asset.system.combobox.models.pathwaymodel',//it's work autoload: true } ext.create('ext.data.store',{ model:'pathwaymodel',//it doesn't work autoload:true}
look @ documentation:
name of model associated store. string used argument ext.modelmanager.getmodel.
i expects name, not alias thats reason works name.
if want create custom store accepts model alias can using getnamebyalias() (but guess you'd use diffrent prefix , not widget).
Comments
Post a Comment