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")){
//轉發(fā)到列表完成頁面
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 閱讀(155)
評論(0) 編輯 收藏