ExtJS ComboBox下拉框

下拉框,选项数据从服务器端获取

			         new Ext.form.ComoBox({
			             id:'', 
			             hiddenName:'', //后台的变量名
			             fieldLabel:'', 
			   	  		 allowBlank:false,
			             emptyText:'请选择',
			             displayField:'name', //显示列
			             valueField:'id', //值
			   	         mode: 'local' ,
			             editable: false,
			             triggerAction: 'all',
			             anchor:'85%', 
			   	         store:new Ext.data.Store({
			   			           autoLoad:true, //自动加载数据
			   			           proxy: new Ext.data.HttpProxy({url: 'demo.action'}),
			   			   		   reader: new Ext.data.JsonReader({
			   						           root: 'goodstypeList'
			   					           }, [{name : 'name'},{name : 'id'}]
			   			           )
			   	         })
			         });

你可能感兴趣的:(combobox)