当你的才华不能撑起你的野心时,就是你该选择学习的时候了!

extjs combobox 事件

change---显示的值改变事件 
select---选中选项事件 
expand---下拉框展开事件 
collapse--下拉框折叠事件 

{
xtype: 'container',
width: 250,
margin: "3 0 0 5",
items: [
{
xtype: 'combobox',
flex: 1,
fieldLabel: '<span style="color:red;">*</span>期数',
labelAlign: 'right',
labelWidth: 100,
name: 'frepaylimit',
displayField: 's_name',
valueField: 's_value',
emptyText: '---请选择---',
editable: false,
store: Ext.create('Ext.data.Store', {
fields: [
{
name: 's_name'
},
{
name: 's_value'
}
],
data: null
}),
validator: function (value) {
if (value.trim() == "") {
return "不能为空!"
}
return true;
},
listeners: {
'expand': function () {
var frepaylimit = me.down("*[name=frepaylimit]");
frepaylimit.clearValue();
var storefrepaylimit = frepaylimit.getStore();
var sel = parseInt(me.down("*[name=fproductid]").getValue());
//alert(sel);
switch (sel) {
case 14://精英贷
case 15://白领贷
storefrepaylimit.loadData(sqqs1);
break;
default:
storefrepaylimit.loadData(sqqs2);
break;
}
frepaylimit.focus();
}
}
}
]
}

posted @ 2016-02-16 15:05  hofmann  阅读(3817)  评论(0)    收藏  举报