【发布时间】:2013-08-29 18:46:38
【问题描述】:
我创建了延迟加载组合框,它通过输入的值查询数据。但是当我从数据库加载值并单击展开列表按钮时出现问题,它发送带有空掩码的请求而不是获取组合框的值,似乎由于某种原因而采用了空值。
这是我的组合框:
editor : {
xtype : 'lazycombo',
minChars : 1,
pageSize : 20,
id : 'tax-code-combo',
store : 'TaxCodesStore',
triggerAction : 'all'
}
这里是请求参数:
limit 20
mask
organizationId 108
start 0
掩码为空,而不是设置值之前。
感谢您的帮助
我的商店:
TaxCodesStore = Ext.extend(Ext.data.JsonStore, {
constructor : function(cfg) {
cfg = cfg || {};
TaxCodesStore.superclass.constructor.call(this, Ext.apply({
storeId : 'TaxCodesStore',
api : {
read : 'taxCode/getPagedList'
},
root : 'data',
baseParams : {
organizationId : 0
},
idProperty : 'taxCode',
fields : [ {
mapping : 'taxCode',
name : 'value'
}, {
mapping : 'taxCode',
name : 'label'
}, {
name : 'orgId',
type : 'int'
}, {
name : 'percentageRate',
type : 'int'
} ]
}, cfg));
}
});
new TaxCodesStore();
更新
我在调查后发现,组合框方法getValue() 返回值,但由于某种原因 in 未根据请求设置为存储参数掩码。
【问题讨论】:
标签: javascript extjs combobox