jQuery-easyui中的combobox如何动态获取下拉框内容


参考事例如下:
	
	/**
	 * 获取下拉框的公司名称(action)
	 * @return
	 */
	private String webObj;
	public String getColageData() {
		List list = new ArrayList();
		try {
			//comCaseService为服务层的service
			// 设置初始关联
			comCase.setCaseFlag(Constants.IS_EXIST_FLAG);
			ComboTree cb = new ComboTree();
			list = comCaseService.getAll(comCase);
			cb.setText("---请选择---");
			setJsonArray(JSONArray.fromObject(list));
		} catch (Exception e) {
			e.printStackTrace();
			logger.error(this.getClass().getName() + " getColageData() error:" + e.getMessage());
		}
		return goJsonArray();
}
	public class ComboTree implements Serializable {													private static final long serialVersionUID = 1L;
	private String id;
	private String text;
	private String iconCls;
	private boolean checked;
	private String strChecked;
	private boolean selected;
	private String state;
	private boolean isLeaf;
	private List children;
	private transient String parent;
	private transient String description;
	private transient Integer lev;
	private Attributes attributes;																}
		
	
	
		
		FROM com_case T 
		
			, company_info t2
		
		
	
	
	
		SELECT
		
			t2.companyName,
		
		T.id id,
		T.company_id companyId,

	
	
	
		
			
				and T.company_id = t2.id
			
			
				and T.company_id = #{companyId}
			
		
	



 
  

 
 

你可能感兴趣的:(jQuery-easyui中的combobox如何动态获取下拉框内容)