📄 node_modify.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"%>
<%
// 如果操作员没有登录,则转到登录页面
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;
}
request.setCharacterEncoding("gb2312");
String id_error = request.getParameter("id_error");
String error_message =null;
//判断从后面返回的错误信息
if(id_error==null) {
id_error="";
} else if (id_error.equalsIgnoreCase("1") ) {
error_message = "参数错误";
response.sendRedirect("tree_show.jsp");
return;
} else if (id_error.equalsIgnoreCase("2") ) {
error_message = "节点名称不能为空";
} else if (id_error.equalsIgnoreCase("3") ) {
error_message = "节点名称已经被占用,请重新选择";;
} else {
error_message = "内部系统错误!";
}
String node_id = request.getParameter("node_id");
String father_id=null;
String name=null;
String url=null;
TreeObject tObject=null;
TreeNodeObject node=null;
tObject=(TreeObject)application.getAttribute("tree");
//得到节点信息
DefaultMutableTreeNode dfNode=tObject.getNode(node_id);
node=(TreeNodeObject)dfNode.getUserObject();
father_id=node.getFatherId();
name=node.getName();
url=node.getUrl();
%>
<html>
<head>
<title>树型结构管理———修改节点</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="style.css" type="text/css">
<script language="javascript">
function goAction()
{
if(modify_node_frm.name.value == ""){
alert("节点名称不能为空!");
return false;
}
return true;
}
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" background="images/background.jpg" style="background-repeat:no-repeat">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td rowspan="3" width="30"></td>
<td></td>
<td rowspan="3" width="30"></td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="5"></td>
</tr>
<tr>
<td colspan="5" class="title" height="30"><br>
<b>修改节点<br>
<br>
<%
if (error_message != null) {
out.println("错误消息:");
out.println(error_message);
}
%></b></td>
</tr>
<tr>
<td colspan="5" class="content" height="12">请修改节点信息 </td>
</tr>
<tr>
<td colspan="5" background="images/bg_table1.gif" height="6"></td>
</tr>
<form name="modify_node_frm" method=post action="node_modify_do.jsp">
<tr bgcolor="ACE3EB">
<td height="24" width="20"> </td>
<td height="24" colspan="4" bgcolor="ACE3EB" class="table_title">节点信息 </td>
</tr>
<tr bgcolor="5DC6D5">
<td colspan="5" height="1"></td>
</tr>
<tr>
<td height="24" width="20"> </td>
<td class="content" height="24" width="88">节点编号</td>
<td class="content" height="24" colspan="2"><%=node_id%></td>
<td height="24" class="content"></td>
</tr>
<tr bgcolor="5DC6D5">
<td colspan="5" height="1"></td>
</tr>
<tr>
<td height="24"> </td>
<td class="content" height="24">父亲节点编号</td>
<td class="content" height="24" colspan="2"><%=father_id%></td>
<td height="24" class="content"></td>
</tr>
<tr bgcolor="5DC6D5">
<td colspan="5" height="1"></td>
</tr>
<tr>
<td height="24"> </td>
<td class="content" height="24">节点名称</td>
<td class="content" height="24" colspan="2"><input name="name" type="text" class="content" id="name" size="20" value="<%=name%>"></td>
<td height="24" class="content"></td>
</tr>
<tr bgcolor="5DC6D5">
<td colspan="5" height="1"></td>
</tr>
<tr>
<td height="24"> </td>
<td class="content" height="24">连接URL</td>
<td class="content" height="24" colspan="2"><input name="url" type="text" class="content" id="url" size="20" value="<%=url%>"></td>
<td height="24" class="content"></td>
</tr>
<tr bgcolor="5DC6D5">
<td colspan="5" height="1"></td>
</tr>
<tr>
<td colspan="5" background="images/bg_table2.gif" height="7"></td>
</tr>
<tr>
<td colspan="5" height="20"><input type="hidden" name="node_id" id="node_id" value="<%=node_id%>"></td>
<td colspan="5" height="20"><input type="hidden" name="father_id" id="father_id" value="<%=father_id%>"></td>
</tr>
<tr>
<td colspan="5" height="20" align="center">
<input type="submit" name="submit" value="提交" onClick="return goAction();">
<input type="reset" name="reset" value="重填"> </td>
</tr>
</form>
</table>
</td></tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -