您好,我有绑定到组合框的商店。当我向组合框添加值时,它开始加载数据。响应中正确返回了所有 json 数据,但没有加载记录来存储。有什么建议么?
我的商店看起来像:
CheckersStore = Ext.extend(Ext.data.JsonStore, {
constructor : function(cfg) {
cfg = cfg || {};
CheckersStore.superclass.constructor.call(this, Ext.apply({
storeId : 'CheckersStore',
api :{
read : 'checker/getPagedList'
},
baseParams : {
organizationId : 0
},
idProperty : 'userName',
fields : [ {
mapping : 'userName',
name : 'value'
}, {
mapping : 'fullName',
name : 'label'
}, {
name : 'organizationId',
type : 'int'
} ]
}, cfg));
}
});
new CheckersStore();
返回的 JSON 数据如下所示:
{
"start" : 0,
"limit" : 20,
"total" : 48,
"data" : [{
"userName" : "KUUJOMAR",
"fullName" : "Kuujo, Marketta Päivi",
"organizationId" : 108
}, {
"userName" : "KUUKKKAL",
"fullName" : "Kuukka, Kalle",
"organizationId" : 108
}
],
"organizationId" : 108
}
即使我只是尝试store.load()
使用相同的参数调用,也会出现同样的问题。