editor : new Ext.form.ComboBox({ allowBlank:false, editable:false, blankText : '采购单位不能为空', triggerAction : 'all', valueField : 'id', displayField : 'name', mode : 'remote', getRawValue:function(){//重写getRawValue()方法使其获取显示值 if(this.valueField){ return Ext.isDefined(this.value)?this.value:""; }else{ return Ext.form.ComboBox.superclass.getValue.call(this); } }, getValue:function(){//重写getValue()方法使其获取隐藏值 //在EditorGridPanel中,combo调用的是此方法,但是只能获取隐藏值 var a = this.rendered?this.el.getValue():Ext.value(this.value,""); if(a===this.emptyText){ a=""; } return a; }, store : new Ext.data.Store({ url : '${ctx}/admin/getDictionaryList.do?code=MeasureUnit', reader : new Ext.data.JsonReader({ root : 'list' },[ {name : 'id',type : 'string'}, {name : 'name',type : 'string'} ]) }), listeners:{ 'select' : function(e){ } } })
浙公网安备 33010602011771号