熟悉ibatis的請幫幫忙!
I use the executeQueryForPaginatedList() which returns a PaginatedList that retrieves records from the database at a time for display on a JSP. some code as follows:
PaginatedList pagelist=myservice.getFactitem();
<%
String pagedirection=servlet.requestStr(request,"pageDirection");
if (pagedirection.equals("previous")) {
pagelist.previousPage();}
else if (pagedirection.equals("next")) {
pagelist.nextPage();
}
%>
......
......//read and displayed data
......
<table align="center">
<tr >
<td colspan="5" align="right" valign="middle" class=link04>total<font color=red><%= myservice.getFactitemnum() %></font>records
<% if (pagelist.isPreviousPageAvailable()) { %><a href="index.jsp?pageDirection=previous"><img src="/images/prev.gif" border="0"></a>
<% } if (pagelist.isNextPageAvailable()) { %><a href="index.jsp?pageDirection=next"><img src="/images/next.gif" border="0"></a>
<% } %> </td>
</tr></table>
------CASE----
when I have ONLY 2 page of records(20 rows), clicked on the "next page" button, row 11~20 were displayed. then clicked on "previous page" button,row 1~10 were displayed. when I have MORE THAN 2 page of records clicked on the "next page" button, row 21~30 were not displayed. the "next page" button do not work! what's wrong with my code? please help me!
Thanks...
PaginatedList pagelist=myservice.getFactitem();
<%
String pagedirection=servlet.requestStr(request,"pageDirection");
if (pagedirection.equals("previous")) {
pagelist.previousPage();}
else if (pagedirection.equals("next")) {
pagelist.nextPage();
}
%>
......
......//read and displayed data
......
<table align="center">
<tr >
<td colspan="5" align="right" valign="middle" class=link04>total<font color=red><%= myservice.getFactitemnum() %></font>records
<% if (pagelist.isPreviousPageAvailable()) { %><a href="index.jsp?pageDirection=previous"><img src="/images/prev.gif" border="0"></a>
<% } if (pagelist.isNextPageAvailable()) { %><a href="index.jsp?pageDirection=next"><img src="/images/next.gif" border="0"></a>
<% } %> </td>
</tr></table>
------CASE----
when I have ONLY 2 page of records(20 rows), clicked on the "next page" button, row 11~20 were displayed. then clicked on "previous page" button,row 1~10 were displayed. when I have MORE THAN 2 page of records clicked on the "next page" button, row 21~30 were not displayed. the "next page" button do not work! what's wrong with my code? please help me!
Thanks...
相關文章
- 請熟悉混沌原理和c高手幫個忙 (轉)
- 請高手幫忙!
- 急!!請高手幫忙
- jbuilder高手請幫忙UI
- 請各位高手幫忙!
- 本人初學JAVA請各位幫幫忙...Java
- 請高手幫幫忙,給點兒資訊也行
- Jbuilder 問題,請大俠幫忙!!!UI
- 各位高手請幫忙,不勝感激!!!!
- 高手幫忙
- 高手幫忙!
- Jive後臺使用SQLServer的同志請幫忙!SQLServer
- benq大哥,幫忙,請進入,謝謝!ENQ
- 安裝出錯,請幫忙看看(轉)
- 請各位幫幫忙――怎樣在Jbuilder x中加入sql的驅動UISQL
- NIO Socket的2個問題?請高手幫忙!
- 請高手幫忙了,關於javamail的問題JavaAI
- JNDI中Context初始化的問題!請幫幫忙,急需解決!Context
- 一個執行緒的問題。請大俠進來幫幫忙看看執行緒
- 急,高手幫忙!
- 請幫忙 理解一下 BOUNDED CONTEXTContext
- 有關javaAPI,請各位高手幫忙,拜謝JavaAPI
- 業務平臺的開發(高手們幫幫忙!)
- 高手請幫忙看看小弟寫的這個web service:Web
- 一個郵件的JAVABEAN問題,請高手幫忙JavaBean
- 需要高手幫忙~~
- 實在是解決不了,請各位高手幫忙
- 分頁Bean的同步問題,,請大家幫忙解決Bean
- RMI物件繫結到JNDI的問題,請高手幫忙!物件
- jive配置中的database問題?!請幫忙阿謝謝!Database
- 關於反射的問題,請高手幫忙!線上急等!反射
- 關於digest認證的問題,請高手幫忙
- 又是令人頭痛的字元亂碼問題!!請幫忙!字元
- 紅旗5.0的安裝問題。請高手幫忙(轉)
- 請教關於jive原始碼,請各位高手幫忙 ,謝謝!!!原始碼
- 請好心人幫忙-關於打包部署檔案
- jf6.2初學者問題,請大家幫忙看看
- 大家幫幫忙,看看這個SQL怎麼寫!SQL