ext中json页面处理接收的值
JSONArray jsonRoot = new JSONArray();
JSONObject item = new JSONObject();
item.put(UIConstants.JSON_ID, deptId);
item.put(UIConstants.JSON_NAME, deptName);
item.put(UIConstants.JSON_NODETYPE, "dept");
jsonRoot.put(item);
String jsonOrgs = jsonRoot.toString();
request.setAttribute("jsonOrgs", jsonOrgs);
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<bb.length;i++){
var option = document.createElement('option');
option.value = bb[i].id;
option.text= bb[i].name;
sele.add(option);
}
}