当前位置: 代码迷 >> 综合 >> EXTJS2.2组件Combobox-lovcombo多选框操作
  详细解决方案

EXTJS2.2组件Combobox-lovcombo多选框操作

热度:70   发布时间:2023-11-03 08:05:51.0

Combobox-lovcombo多选框css和js文件见我的另一篇:https://blog.csdn.net/qq_37279783/article/details/88019873

组件:

    var reasonCatStore = new Ext.data.JsonStore({proxy: new Ext.data.HttpProxy({method: "POST",url: "<%=request.getContextPath()%>/problem_getDictByClassId.action?classId=CAUSECLASS"}),root: "rows",fields:['code','name'],id:"reasonCatStore"});//加载数据reasonCatStore.load();var reasonCat = {xtype : 'lovcombo',fieldLabel : '名称',labelSeparator : " ",id : 'reasonCat',displayField : 'name',valueField : 'code',store : reasonCatStore,mode : 'local',triggerAction : 'all',allowBlank:true,emptyText : '请选择...',readOnly : true,name:'reasonCode',hiddenName:'reasonCode',anchor : '30%',//鼠标失去焦点时,输入框为空时加入以下事件beforeBlur:function () {var val = this.getCheckedValue();var dsval = this.getCheckedDisplay();form_panel.getForm().findField("reasonCode").setValue(val);form_panel.getForm().findField("reasonCode").setRawValue(dsval);}};

 

  相关解决方案