[英]Extjs combo box not diplaying selected value
I have this combobox configuration: 我有此组合框配置:
{
width: 70,
xtype: 'combo',
fieldLabel: _mobile,
displayField: 'num_mobile',
valueField: 'id',
id: 'ListMobileCmd',
store: mobilesStore,
triggerAction: 'all',
emptyText: 'Mobiles',
mode: 'local'
}
ans my store is: 我的商店是:
var mobilesStore = new GeoExt.data.FeatureStore({
layer: MobileLayer,
proxy: new GeoExt.data.ProtocolProxy({
protocol: new OpenLayers.Protocol.HTTP({
url: SERVER+"/mobiles_personnes",
format: new OpenLayers.Format.GeoJSON()
})
}),
autoLoad: false,
sortInfo: { field: 'num_mobile', direction: 'ASC'},
fields: [{name: 'id', mapping: 'id'},
{name: 'num_mobile'},
{name: 'tm_id'},
{name: 'is_owner'},
{name: 'datetime_deb'},
{name: 'nom'},
{name: 's_id'},
{name: 'p_id'},
{name: 'cin'},
{name: 'login'},
{name: 'type'},
{name: 'adresse'},
{name: 'prenom'},
{name: 'num'},
{name: 'pwd'},
{name: 'datetime_fin'},
{name: 'num_mobile'},
{name: 'email'}]
});
I got all my items in my combobox but it always displays the first item, as selected, when I select any item from the list! 我将所有项目都放在了组合框中,但是当我从列表中选择任何项目时,它始终显示所选的第一个项目! Any ideas? 有任何想法吗?
我之前也遇到过相同的问题:)只需将您的值更改为“ num_mobile”,即可正常工作。
valueField: 'num_mobile',
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.