Не бойтесь, вам нужно два экземпляра вашего магазина.
Почему бы не расширить свой магазин, просто сделать его предварительно настроенным так:
Ext.regModel('abc', {
fields: [{name: 'tid', type: 'int'}, {name: 'name', type: 'string'}, {name: 'parent', type: 'int'}]});
MyStore = Ext.extend(Ext.data.Store, {
constructor: function(config) {
config = Ext.apply({
model: 'abc',
proxy: {
type: 'ajax',
url : 'read.php',
reader: {
type: 'json',
root: 'items',
fields: ['tid', 'name', 'parent']
}
},
autoLoad: true,
}, config);
MyStore.superclass.constructor.call(this, config);
}
})
Затем вы можете использовать несколько экземпляров вашего магазина и фильтровать их, как вы хотите:
items: [
{
xtype: 'selectfield',
name : 'One',
label: 'Category',
store: new MyStore(), //1st instance of MyStore
displayField: 'name',
valueField: 'tid',
listeners : {
'render' : function(){
this.store.filter('name', 'digital');
}
}
},{
xtype: 'selectfield',
name : 'Two',
label: 'subCategory',
store: new MyStore(), //2nd instance of MyStore
displayField: 'name',
valueField: 'tid',
listeners : {
'render' : function(){
this.store.filter('parent', 1);;
}
}
},{
...}
]