【发布时间】:2021-09-16 19:37:18
【问题描述】:
以下场景:
{
xtype: 'combo',
displayField: 'LANGTEXT',
valueField: 'KURZTEXT',
store: {
remoteSort: false,
autoLoad: false,
pageSize: 999999,
fields: [
{ name: 'KURZTEXT', type: 'string' },
{ name: 'LANGTEXT', type: 'string' }
],
proxy: {
type: 'ajax',
url: 'callHandler.cfc',
actionMethods: { read: 'POST' },
reader: {
type: 'json',
rootProperty: 'DATA.ROWS',
totalProperty: 'TOTALCOUNT'
}
},
listeners: {
load: function(store, records, successful, operation, eOpts ){
//is something like this possible?
var combo = store.getCombo()
}
}
}
}
是否可以从商店获取组合框引用,如下所示:store.getCombo()?我知道通常您只能从组合框中获取商店引用。但我想如果商店是在组合框中创建的,也许它也可以反过来工作?
【问题讨论】:
-
据我所知,我们无法从 store 中获取组件,因为单个 store 可以在多个组件中使用,并且每个组件中的所有这些 store 副本都是相同的。所以简而言之,这是不可能的。为什么要使用这个
store.getCombo()?
标签: javascript extjs combobox store