Ext的异步请求(二级级联动态加载下拉列表)

页面:


			作业计划项模板
			 
				
			
		
		
			
			作业计划项名称
			
				
				  
				   
			 
			


 

 

前台页面的调用:

前台接收到 json 的处理

Ext.Ajax.request({
		method:'post',
               	url: '../assessmodel/functionContent.do?functionId='+id,                           
               	success: function(json){ 
					  var aa = json.responseText;
					  var data = eval('('+aa+')');
					  var bb=data.rows;
					  var sele = document.getElementById("s2");
					  sele.innerHTML = "";
					  var option2 = document.createElement('option');
					  	option2.value ="";
					  	option2.text= "请选择";
					  	option2.selected="selected";
					  	sele.add(option2);		
					  for(var i=0;i


后台的处理:

private ActionForward findFunction(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		IAssessModelMgr assessModelMgr = (IAssessModelMgr) getBean("assessModelMgr");
		String id = request.getParameter("functionId");
		List assList =null;	
		List nList = new ArrayList();
	    
		try {
			assList = assessModelMgr.findFunctionList(id);
			//request.setAttribute("functionList",assList);
			for(int i=0;i


 

 

你可能感兴趣的:(ExtJs,ext)