extjs4 - Extjs 6 Define a chained store using Ext.define -
can chained store define using ext.define statement? tried following code i'm getting errors:
ext.define('myproject.store.relfiltered', { extend: 'ext.data.chainedstore', source:'myproject.store.rel', alias: 'store.releasesfiltered' });
the errors receive are:
ext.data.chainedstore.applysource(): invalid source "myproject.store.rel" specified ext.data.chainedstore
and
ext.mixin.bindable.applybind(): cannot use bind config without viewmodel
i got idee this post, seems code incomplete.
thank you
can chained store define using ext.define statement?
definitely yes. source config of chained store says should either store instance or id of existing store.
so code this:
ext.define('myapp.store.mychainedstore', { extend: 'ext.data.chainedstore', storeid: 'mychainedstore', //source using storeid source: 'originalstore' }); ext.define('myapp.store.originalstore', { extend: 'ext.data.store', requires: [ 'ext.data.field.field' ], storeid: 'originalstore', data: [{ id: 1, name: 'commodi' }], fields: [{ name: 'id' }, { name: 'name' }] });
check out fiddle example https://fiddle.sencha.com/#view/editor&fiddle/1kk4
Comments
Post a Comment