首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

ext comboBox 设立 displayFiled

2012-11-23 
ext comboBox 设置 displayFiledvar zhishi new Ext.form.ComboBox({fieldLabel : 制式,name : syste

ext comboBox 设置 displayFiled

var zhishi = new Ext.form.ComboBox({fieldLabel : '制式',name : 'system',emptyText:'请选择...',readOnly : true,valueField :'systemId',displayField : 'systemLcName',mode : 'local', // 必须//triggerAction : 'all',width : 140,store : new Ext.data.Store({autoLoad : true,proxy : new Ext.data.HttpProxy({url : 'ruleOper.do?action=getAllSystem',method : "post"}),reader : new Ext.data.JsonReader({root : 'list',id : 'systemId'}, [{name : 'systemId'}, {name : 'systemLcName'}])})});zhishi.store.on('load',function(store,record,opts){      var myvalue= record[0].data.systemId;//这种方法也可以获得第一项的值systemId,systemLcName都是reader 得  var myrawvalue=record[0].data.systemLcName;  zhishi.setValue(myvalue);  zhishi.setRawValue(myrawvalue);  });   




热点排行
Bad Request.