?? node_delete.jsp
字號:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page import="com.socialite.bizlogic.util.CookieTool,
com.socialite.bizlogic.util.Char,
com.socialite.bizlogic.client.BizLogicClient,
com.socialite.bizlogic.util.XMLObject,
com.socialite.bizlogic.tree.TreeNodeObject,
com.socialite.bizlogic.tree.TreeObject,
com.socialite.bizlogic.tree.TreeIterator,
javax.swing.tree.DefaultTreeModel,
javax.swing.tree.DefaultMutableTreeNode"%>
<%
// 如果操作員沒有登錄,則轉(zhuǎn)到登錄頁面
String op_id = com.socialite.bizlogic.util.CookieTool.getCookieValue(request.getCookies(),"op_id");
if(op_id==null)
{
response.sendRedirect("/login/logout.jsp");
return;
} else if (op_id.equalsIgnoreCase("-1") ){
response.sendRedirect("/login/logout.jsp");
return;
}
if(op_id==null||false)//check privilege here
{
response.sendRedirect("/login/logout.jsp");
return;
}
request.setCharacterEncoding("gb2312");
String node_id=request.getParameter("node_id");
if(node_id==null){
response.sendRedirect("tree_show.jsp");
return;
}
StringBuffer xml=new StringBuffer("<bizlogic><logic_name>com.socialite.bizlogic.businesslogic.treemanagementlogic.TreeManagementBusinessLogic</logic_name>");
xml.append(Char.LINE_SEPARATOR);
xml.append("<requesttype>DELETE_TREE_NODE</requesttype>");
xml.append(Char.LINE_SEPARATOR);
xml.append("<requestparameter>");
xml.append("<node_id>" + node_id + "</node_id>" + Char.LINE_SEPARATOR);
xml.append("</requestparameter>");
xml.append(Char.LINE_SEPARATOR);
xml.append("</bizlogic>");
xml.append(Char.LINE_SEPARATOR);
BizLogicClient hc=new BizLogicClient();
String xmlResult=hc.send(xml.toString());
XMLObject xmlObj = new XMLObject(xmlResult,0);
String result=xmlObj.getValue("bizlogic.resultcode");
if("0".equals(result)){
//操作成功,更新application樹中節(jié)點信息
TreeObject tObject=null;
TreeNodeObject node=null;
tObject=(TreeObject)application.getAttribute("tree");
//得到節(jié)點信息
DefaultMutableTreeNode dfNode=tObject.getNode(node_id);
node=(TreeNodeObject)dfNode.getUserObject();
tObject.deleteNode(node);
}
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>樹型節(jié)點管理——刪除節(jié)點</title>
</head>
<body>
<table width="916" height="351" border="0.2">
<%
if("0".equals(result)){
%>
<tr>
<td height="169"><div align="center">
<p>您的操作成功</p>
<p>請<a href="tree_show.jsp">返回主頁</a></p>
</div></td>
</tr>
<%
}else{
%>
<tr>
<td><div align="center">操作失敗,請<a href="tree_show.jsp">重試</a></div></td>
</tr>
<%
}
%>
</table>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -