公司采用<frameset>框架级做的网站,准备从新开发一版,框架还没有搭建好,今天测试一下分页!
结果: 模糊查询时,不管条件怎么变,list始终不变,不知何原因!
下面是我的代码
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/cssBasePage.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="<%=basePath%>">
<title>My JSP 'showPriv.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<link href="<%=path%>/css/index_hljypt.css" rel="stylesheet" type="text/css" />
</head>
<body>
<!-- Top 面包屑 开始 -->
<div class="breadcrumb">
<ul>
<li><img src="images/icons/icon_breadcrumb.png" alt="Location" /></li>
<li><strong>当前位置:</strong></li>
<li class="current">工号及权限管理</li>
<li>></li>
<li class="current">部门查询与管理</li>
</ul>
</div>
<!-- Top 面包屑 结束 -->
<div class="headings altheading">
<h2>查询区</h2>
</div>
<div class="contentbox">
<form id="form" action="department_queryDepartment" target="main">
<table align="center">
<tr>
<td class="txtright">
部门名称:
</td>
<td class="txtleft">
<input type="text" id="depName" name="department.depName" value="${ department.depName }"
maxlength="50" autocomplete="off" class="inputbox"/>
<span id="depName"></span>
</td>
</tr>
<tr>
<td>
</td>
<td class="txtleft">
<input type="submit" id="chaxun" value="查 询" class="btn" />
<input type="reset" value="重 置" class="btnalt" οnclick="resetForm()"/>
</td>
<td>
</td>
</tr>
</table>
</form>
</div>
<div class="headings altheading">
<h2>查询列表</h2>
</div>
<div class="contentbox">
<!-- 分页 -->
<t:table name="a" list="list" width="800">
<t:column title="部门编号" property="DEPNUM" width="10%" />
<t:column title="部门名称" property="DEPNAME" width="20%" />
<t:column title="创建时间" width="20%">
<fmt:formatDate value="${a.CREATEDATE }" pattern="yyyy-MM-dd HH:mm:ss"/>
</t:column>
<t:column title="处理工号" property="EMPLOYEEID" width="20%" />
<t:column title="状态" property="STATE" width="10%" />
<t:column title="详情" width="20%">
<button οnclick="alert('${a.DEPNAME}')">
detail
</button>
<button οnclick="toJump('${a.STATE}')">
update
</button>
</t:column>
</t:table>
<t:pagination url="department_queryDepartment" name="department"></t:pagination>
<!-- 分页 -->
</div>
</body>
</html>
#####总结:<form id="form" action="department_queryDepartment" target="main">
罪魁祸首是红色部分target="main",由于没有找到main,所以只刷新本页,不跳转。
所以效果就像:怎么修改查询条件,list结果始终不变! 起初怀疑是缓存了,或分页有错!
注意注意!!!!!!!