日期:2014-05-16 浏览次数:20392 次
1、说明
??? extjs combo经常会根据其他文本框中值去load 数据。
?
2、代码如下
?
{ id:'lovcombo_cars',
hiddenName:'carNumber',
xtype:'combo',
width:260,
fieldLabel: '车牌号',
maxHeight:200,
readOnly:true,
editable:false,
pageSize:10,
mode:'remote',
store:new Ext.data.JsonStore({
storeId:'incomingCarStore',
url: 'data/orgCar.do',
root: 'orgCars',
totalProperty: 'totalCount',
remoteSort: true,
fields: ['id','name']
}),
valueField:'id',
displayField:'id',
triggerAction:'all',
onTriggerClick : function() {
//--处理点下拉框不能展开菜单
if(this.disabled){
return;
}
if(this.isExpanded()){
this.collapse();
}else {
this.onFocus({});
this.expand();
}
this.el.focus();
//--end
//取得其他文本框中的值作为条件
var no = Ext.getCmp('idx_outside_orgNo').getValue();
if(no == ''){
Ext.MessageBox.show({title : '警告', msg : '请选择选择外地企业!', buttons : Ext.MessageBox.OK,icon : Ext.MessageBox.WARNING});
return false;
}
//提交查询
var s = Ext.StoreMgr.lookup('incomingCarStore');
s.load({params : {orgNo : no,start : 0,limit : 10}});
}
}
?