extjs - Unable to insert in localstorage -
i have model:
ext.define('sizomag.model.sizobuscetmodel', { extend: 'ext.data.model', config: { fields: [{name: 'text', type: 'string'}, {name: 'price', type: 'string'}], proxy: { type: 'localstorage', id : 'buscetmodel' } } });
and store
ext.define('sizomag.store.sizobuscetstore', {extend: 'ext.data.store', config: { storeid: 'sizobuscetstore' } });
but when seek add together entry store - error [warn][ext.data.operation#setmodel] unless define model using metadata, operation needs have model defined.console.js:35
[warn][ext.data.reader.reader#process] in order read record data, reader needs have model defined on it. console.js:35
uncaught typeerror: object not function
i add together so
var store=ext.getstore('sizobuscetstore'); store.load();store.add({text:'txt',price:'150'}); store.sync();
please help me/ tnx
try instead, need define model type store can configure reader:
ext.define('sizomag.store.sizobuscetstore', { extend: 'ext.data.store', storeid: 'sizobuscetstore', model: 'sizobuscetmodel' });
extjs insert sencha-touch touch local-storage
No comments:
Post a Comment