在做page查询的时候出现了一些小问题

来源:互联网 发布:京东红菩提软件 编辑:程序博客网 时间:2024/06/05 22:36

今天在做page查询的时候出现了一些问题,在填完查询条件时,搜索的到的page页面,当点击页面中的下一页,导致查询框中的查询条件都消失不见。找了半天。


大概就是这样,点击下一页到时查询框不见,当时一直在找jsp和后台java代码中的set、getParameter和set、getAttribute,但是一直都不对,仔细的再jsp页面找了下,

看到是page那里有form属性

<form id="pageForm" name="pageForm" method="post" action="/missive/processing/workitem/Form.do?action=showQueryReferenceNew"><input id="targetPage" name="page" type="hidden" value=""/><span style="white-space:pre"></span><input name="ext2"  value="${ext2 }" type="hidden"><input name="docInstName" value="${docInstName }" type="hidden" ><input id="creatorId" type="hidden" name="creatorId" value="${creatorId}" /><input id="creator" type="hidden" name="creator" value="${creator}"/><input id="createDpt" type="hidden" name="createDpt" value="${createDpt}"/><input id="createDpt_id" type="hidden" name="createDpt_id" value="${createDpt_id}"/><input id="createTime_start" type="hidden" name="createTime_start" value="${createTime_start}"/><input id="createTime_end" type="hidden" name="createTime_end" value="${createTime_end}"/><input id="formsetName_id" type="hidden" name="formsetName_id" value="${formsetName_id}"/><input id="formsetName" type="hidden" name="formsetName" value="${formsetName}"/><table border="0" cellpadding="0" cellspacing="0"class="pageBar"><span style="white-space:pre"></span><tr><span style="white-space:pre"></span><td class="pageBarInfo">共<%=pageInfo.getTotalPage() %>页 <%=pageInfo.getTotalNumber() %>条记录</td><span style="white-space:pre"></span><td class="pageBarGo"><span style="white-space:pre"></span><table border="0" cellspacing="0" cellpadding="0"><span style="white-space:pre"></span><tr><span style="white-space:pre"></span><td><span style="white-space:pre"></span><table border="0" cellspacing="0" cellpadding="0" class="pageBarSelect"><span style="white-space:pre"></span><tr><span style="white-space:pre"></span><td>第</td><span style="white-space:pre"></span><td><input id="currPage" size="1" value="<%=pageInfo.getCurrentPage() %>"></td><span style="white-space:pre"></span><td>页</td><span style="white-space:pre"></span><td><input name="" type="button" id="btnGo" class="btnGo"></td><span style="white-space:pre"></span></tr><span style="white-space:pre"></span></table><span style="white-space:pre"></span></td><span style="white-space:pre"></span><td><span style="white-space:pre"></span><table border="0" cellspacing="0" cellpadding="0" class="pageBarBtn"><span style="white-space:pre"></span><tr><span style="white-space:pre"></span><td class="pageBarBtnTd"><input name="pageBtn" id="firstPage" type="button" page="1" value="首页"></td><span style="white-space:pre"></span><td class="pageBarBtnSpace"></td><span style="white-space:pre"></span><td class="pageBarBtnTd"><input name="pageBtn" id="prePage" type="button" page="<%=pageInfo.getCurrentPage() - 1 %>"<span style="white-space:pre"></span>value="上页"></td><span style="white-space:pre"></span><td class="pageBarBtnSpace"></td><span style="white-space:pre"></span><td class="pageBarBtnTd"><input name="pageBtn" id="nextPage" type="button" page="<%=pageInfo.getCurrentPage() + 1 %>"<span style="white-space:pre"></span>value="下页"></td><span style="white-space:pre"></span><td class="pageBarBtnSpace"></td><span style="white-space:pre"></span><td class="pageBarBtnTd"><input name="pageBtn" id="endPage" type="button" page="<%=pageInfo.getTotalPage() %>"<span style="white-space:pre"></span>value="末页"></td><span style="white-space:pre"></span></tr><span style="white-space:pre"></span></table><span style="white-space:pre"></span></td><span style="white-space:pre"></span></tr><span style="white-space:pre"></span></table><span style="white-space:pre"></span></td><span style="white-space:pre"></span></tr></table></form>

form里面的input的属性,添加上去了就行了

0 0
原创粉丝点击