【发布时间】:2012-02-09 19:47:15
【问题描述】:
我的组合框有问题。我构建了一个简单的组合框,它配置了 JsonStore 以提供远程数据。组合框在第一次单击时打开,没有问题,请求 JSON 数据,Ext 显示完整的下拉列表。
但偶尔在第二次(有时是第三次)单击时,组合框既不打开也不加载任何远程数据。
这是我的配置:
var config = {
autoLoad: true,
fields: [{
name: 'name',
type: 'string'
}, {
name: 'count',
type: 'int'
}, {
name: 'created_at',
type: 'int'
}, {
name: 'updated_at',
type: 'int'
}],
root: 'result',
idProperty: 'id',
proxy: new Ext.data.HttpProxy({
method: 'GET',
url: '/myHandler/loadDropDownList'
})
};
组合框本身加载在工具栏中:
var config = {
height: 27,
items: [{
xtype: 'tbtext',
text: 'Your preference?:',
// @todo inline style -> CSS
style: {
'font-weight': 'bold',
'color': '#15428B',
'font-family': 'tahoma,arial,verdana,sans-serif',
'font-size': '11px'
}
},
'->',
// align the following items on the right side of the toolbar
{
xtype: 'combo',
itemId: 'table-combobox',
store: new myStore(),
valueField: 'name',
displayField: 'name',
value: ' - Please Choose - '
}]
}
提前非常感谢!
【问题讨论】: