我想用 XML 加载组合框,但我无法在组合框中获取任何值,这是我到目前为止所做的
var getMessageDomain = function () {
var store = new Ext.data.Store({
url: 'zport/getDomainFilters',
autoLoad: true,
reader: new Ext.data.XmlReader({
record: 'Domain'
}, [{
name: 'name',
mapping: '@name'
}, ])
});
var combo = new Ext.form.ComboBox({
width: 250,
xtype: 'combo',
mode: 'local',
allowBlank: false,
triggerAction: 'all',
forceSelection: true,
editable: false,
fieldLabel: 'Message Domain',
name: 'titlez',
hiddenName: 'titlez',
displayField: 'name',
valueField: 'name',
editable: false,
store: store
});
return combo;
};
我的xml是这样的:
<TDSmessagedomain xmlns="">
<Domain name="AEPL" />
<Domain name="APAP" />
<Domain name="BCP" />
<Domain name="BTCI" />
<Domain name="BGSET" />
<Domain name="COLLCLIENT" />
<Domain name="COLLINT" />
<Domain name="CPL" />
<Domain name="DBWS" />
.........................