?? list_emp.jsp
字號:
<%@ page language="java" pageEncoding="GBK"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
<html:html lang="true">
<head>
<title>Struts+Hibernate實現一對多關系</title>
</head>
<body>
<center>
<h1>
部門信息管理 —— Struts + Hibernate
</h1>
<hr>
<h2>
員工列表
</h2>
<form action="emp.do" method="post">
輸入查詢關鍵字:
<input type="text" name="keyWord">
<input type="hidden" name="status" value="selectlike">
<input type="hidden" name="type" value="0">
<input type="submit" value="查詢">
</form>
<h3>
<a href="dept.do?type=0&status=selectall">進入部門列表頁</a>
<a href="emp.do?type=0&status=selectall">進入員工列表頁</a>
</h3>
<logic:present name="all" scope="request">
<table border="1" width="100%">
<tr>
<td>
姓名
</td>
<td>
年齡
</td>
<td>
性別
</td>
<td colspan="3">
操作
</td>
</tr>
<logic:iterate id="e" name="all" scope="request">
<tr>
<td>
${e.ename}
</td>
<td>
${e.eage}
</td>
<td>
${e.esex}
</td>
<td>
<a href="emp.do?empno=${e.empno}&type=2&status=selectid">修改</a>
</td>
<td>
<a href="emp.do?empno=${e.empno}&type=2&status=delete">刪除</a>
</td>
<td>
<a
href="dept.do?deptno=${e.dept.deptno}&type=2&status=selectdeptemp">查看部門信息</a>
</td>
</tr>
</logic:iterate>
</table>
</logic:present>
<logic:notPresent name="all" scope="request">
<h3>
沒有任何數據!
</h3>
</logic:notPresent>
</center>
</body>
</html:html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -