I have 2 stores with loaded data.
First store:
Ext.define('Connecting.store.Groups', {
extend: 'Ext.data.Store',
requires: [
'Connecting.model.groupModel',
'Ext.data.proxy.Ajax',
'Ext.data.reader.Json'
],
config: {
autoLoad: true,
model: 'Connecting.model.groupModel',
storeId: 'Groups',
proxy: {
type: 'ajax',
url: 'http://localhost/php/getGroups.php',
reader: {
type: 'json'
}
}
}
});
第二个商店:
Ext.define('Connecting.store.Secondgroups', {
extend: 'Ext.data.Store',
requires: [
'Connecting.model.Secondgroup',
'Ext.data.proxy.Ajax',
'Ext.data.reader.Json'
],
config: {
autoLoad: true,
model: 'Connecting.model.Secondgroup',
storeId: 'Secondgroup',
proxy: {
type: 'ajax',
url: 'http://localhost/php/getSecondGroup.php',
reader: {
type: 'json'
}
}
}
});
第一个存储器起作用了;
var store = Ext.getStore('Groups');
console.log(store);
但是,当我将
storeId
更改为'Secondgroup
'(在getStore中)时,我的console.log
会给我一个'undefined'
。我似乎找不到问题所在。您有任何建议应该朝哪个方向寻找问题吗?
注:我正在使用Sencha Architect,但这不应该成为问题。