if(id==null)
{
layer="1";
selSQL="select * from ORGAN where PARENTORGANCODE ='00000000'";
}
else{
selSQL="select * from ORGAN where PARENTORGANCODE="+id;
}
Connection conn=DbManager.getConnection();
PreparedStatement stam=conn.prepareStatement(selSQL);
ResultSet rs=stam.executeQuery();
while(rs.next()){
treeid=rs.getString("ORGANCODE");
name=rs.getString("ORGANNAME");
// toPage=request.getContextPath()+"/skeleton/organization.do?todo=contentTreeAction&treeid="+treeid;
toPage="javascript:void(0);";
// para=layer+"&"+organcode;
returnStr+=name+"■△▲"+toPage+"■△▲"+treeid+"§№☆";
}
// System.out.println("11="+returnStr);
returnStr=returnStr.equals("")?"":returnStr.substring(0,returnStr.length()-3);
if (layer==null||layer.equals("1")){
//转发到列表完成页面
request.setAttribute("tree",returnStr);
return mapping.findForward("showAjaxOrgTree");
}else{
try {
response.getWriter().print(returnStr);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null;
}
posted on 2007-04-17 14:28
NG 阅读(152)
评论(0) 编辑 收藏