{
columnWidth: .25,
layout: "form",
items: [{
xtype: 'combo',
fieldLabel: "区域",
editable: false,
//是否允许输入
hiddenName: 'quyu',
store: areaStore,
mode: 'remote',//第一个combo为remote
triggerAction: 'all',
emptyText: '请选择',
width: 100,
displayField: 'param_value',
allowBlank: false,
blankText: "参数不允许为空",
listeners: {
select: function (combo) {
var quyu = form.getForm().findField("quyu").getValue();
form.getForm().findField("Name").clearValue(); //可以实现当队下拉值变更时,清空从动combo下拉选项中的值
ProjectStore.load({ params: { quyu: quyu} });//加载第二个combo的数据源
}
}
}]
},
{
columnWidth: .25,
layout: "form",
items: [{
xtype: 'combo',
fieldLabel: "选择项目",
editable: false,
//是否允许输入
hiddenName: 'Name',
store: ProjectStore,//数据源
mode: 'local',//第二个combo为local
triggerAction: 'all',
emptyText: '项目名称',
width: 100,
displayField: 'name',
allowBlank: false,
blankText: "参数不允许为空"
}]
}
转载于:https://www.cnblogs.com/suixufeng/archive/2011/12/12/3336109.html