日期:2014-05-17 浏览次数:20694 次
try {
HttpServletResponse response = ServletActionContext.getResponse();
HttpServletRequest request = ServletActionContext.getRequest();
response.setContentType("text/xml;charset=utf-8");
System.out.println("进来了");
PrintWriter out = response.getWriter();
this.id = new Integer(request.getParameter("id"));
Map map = new HashMap();
map.put("ParentInnerCode", id);
ajaxList = branchService.selectList(map);
if(ajaxList!=null){
out.append("<?xml version='1.0' encoding='UTF-8'?>");
out.append("<branch>");
for (int i = 0; i < ajaxList.size(); i++) {
out.append("<branchInnerCode>");
out.append(ajaxList.get(i).getBranchInnerCode());
out.append("</branchInnerCode>");
out.append("<branchCode>");
out.append(ajaxList.get(i).getBranchCode());
out.append("</branchCode>");
out.append("<parentInnerCode>");
out.append(ajaxList.get(i).getParentInnerCode());
out.append("</parentInnerCode>");
out.append("<type>");
out.append(ajaxList.get(i).getType()+"");
out.append("</type>");
out.append("<orderFlag>");
out.append(ajaxList.get(i).getOrderFlag()+"");
out.append("</orderFlag>");
out.append("<name>");
out.append(ajaxList.get(i).getName());
out.append("</name>");
out.append("<treeLevel>");
out.append(ajaxList.get(i).getTreeLevel()+"");
out.append("</treeLevel>");
out.append("<phone>");
out.append(ajaxList.get(i).getPhone());
out.append("</phone>");
out.append("<fax>");
out.append(ajaxList.get(i).getFax());
out.append("</fax>");
out.append("<manager>");
out.append(ajaxList.get(i).getManager());
out.append("</manager>");
out.append("<leader1>");
out.append(ajaxList.get(i).getLeader1());
out.append("</leader1>");
out.append("<row>");
out.append(ajaxList.get(i).getRow()+"");
out.append("</row>");
}
out.write("</branch>");
}
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null;
var state=0;
$("#open").click(function(){
if (state == 0) {
this.src = "../framework/images/butExpand.gif";
state = 1;
} else {
this.src = "../framework/images/butCollapse.gif";
state = 0;
}
$.ajax({
type: "POST", //http请求方式
url: "${ctx}/branch/branchAction_aJax.do", //服务器段url地址
data: "id=" + this.name, //发送给服务器段的数据
&nbs