一维数组对Combobox赋值

1、前台直接赋值

{
	id:'city',
	xtype:'combo',
	fieldLabel:'地级市',										name:'city',
	readOnly:false,
	anchor:'98%',
	msgTarget: 'side',
	mode:'local',
	triggerAction:'all',
	store:[‘运城市’,'晋中市'],
	allowBlank:false,
	blankText:'地级市不能为空'
}

 2、后台传递数据进行赋值(List<String>,一维数组)

{
						id:'city',
						xtype:'combo',
						fieldLabel:'地级市',					 
						name:'city',
						readOnly:false,
						anchor:'98%',
						msgTarget: 'side',
						mode:'local',
						triggerAction:'all',
						store:[],
						allowBlank:false,
						blankText:'地级市不能为空'
}

userController.getUserGroupsCity3(function(data){
		Ext.getCmp('city').getStore().loadData(data);
	})

 

你可能感兴趣的:(combobox)