Hai,<br><br>Here i gave simple sample which uses paging concept.<br><br><b>partnermasterList.html<br></b><br><br><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>"><br>
<html xmlns="<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>" xml:lang="ja" lang="ja"><br><head><br><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><br>
</head><br><body><br><form id="partnermasterListForm"><br><b><div align="right"><br><span id="isNext"><br><input type="button" id="doNext"></input><br>
</span><br><span id="isPrevious"><br><input type="button" id="doPrev"></input><br></span><br></div></b><br><table border="1" width="100%"><br>
<tr class="heading"><br><td><label id="partneremployeecode"/></td><br><td><label id="employeenamekanji"/></td><br><td><label id="employeenamekana"/></td><br>
<td><label id="company"/></td><br></tr><br><div id="partneremployeemasterItems"><br><tr class="item"><br><td><span id="partneremployeecode"></span></td><br>
<td><span id="employeenamekanji"></span></td><br><td><span id="employeenamekana"></span></td><br><td><span id="company"></span></td><br>
</tr><br></div><br><br></table><br><div><span id="messages"></span></div><br><br></form><br></body></html><br><br><br><b>PartnermasterListPage.java</b><br>
<br>
public class PartnermasterListPage {<br>
<br>
public int partneremployeemasterIndex;<br>
public PagingResultBean<Partnermaster> partneremployeemasterItems;<br>
public String partneremployeecode;<br>
public String employeenamekanji;<br>
public String employeenamekana;<br>
public String company;<br>
public PartnermasterBhv partnermasterBhv;<br>
<b> public static int pageNumber;</b><br>
<br>
public Class initialize() {<br>
pageNumber = 1;<br>
System.out.println("INITIALIZE");<br>
return null;<br>
}<br>
<br>
public Class prerender() {<br>
<b>System.out.println("pageNumber"+pageNumber);</b> <span style="background-color: rgb(255, 102, 102);"> //value of pageNumber is always 1.</span><br>
PartnermasterCB partnerCB = partnermasterBhv.newMyConditionBean();<br>
<b> partnerCB.paging(1, pageNumber);</b><br>
partneremployeemasterItems = partnermasterBhv.selectPage(partnerCB);<br>
return null;<br>
}<br>
<br>
public Class doNext(){<br>
<b>pageNumber += 1;</b><br>
return null;<br>
}<br>
<br>
public Class doPrev(){<br>
<b> pageNumber-=1;<br>
</b>return null;<br>
}<br>
<br>
public PagingResultBean<Partnermaster> getPartneremployeemasterItems() {<br>
return partneremployeemasterItems;<br>
}<br>
<br>
public void setPartneremployeemasterItems(<br>
PagingResultBean<Partnermaster> partneremployeemasterItems) {<br>
this.partneremployeemasterItems = partneremployeemasterItems;<br>
}<br>
<br>
public boolean isPrevious() {<br>
return partneremployeemasterItems.isExistPrePage();<br>
}<br>
<br>
public boolean isNext() {<br>
return partneremployeemasterItems.isExistNextPage();<br>
}<br>
}<br><br>
<br>
I want to increase the value of pageNumber by 1 if i click doNext button,and decrease by 1 if i click doPrevious button.<br>
<br>
How can i achieve it?<br>
<br>
Thanks,<br>
$B%H%^%9!#(B<br><br><br><div class="gmail_quote">2009/5/22 Koichi Kobayashi <span dir="ltr"><<a href="mailto:koichik@improvement.jp" target="_blank">koichik@improvement.jp</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">$B>.NS(B (koichik) $B$G$9!%(B<br>
<br>
Date: Fri, 22 May 2009 14:41:05 +0900<br>
<div>From: thomas <<a href="mailto:jp.mcy.10@gmail.com" target="_blank">jp.mcy.10@gmail.com</a>><br>
To: <a href="mailto:seasar-user@ml.seasar.org" target="_blank">seasar-user@ml.seasar.org</a><br>
</div>Subject: [Seasar-user:17500] Re: [Teeda-paging]PagingResultBean<?> pagingResult$B$K$D$$$$$F(B<br>
<div><br>
> <?xml version="1.0" encoding="UTF-8"?><br>
<br>
</div>If you want to IE6 to use strict compliance mode<br>
rather than quirks mode, remove XML declaration.<br>
<br>
<a href="http://teeda.seasar.org/ja/extension/reference/xhtml.html" target="_blank">http://teeda.seasar.org/ja/extension/reference/xhtml.html</a><br>
<br>
<br>
> <form id="employeemasterListForm"><br/><br>
snip<br>
> *<te:include id="tablePages" te:src="/include/pagingInc.html"/>* *// i<br>
<div>> included pagingInc.html*<br>
><br>
> </center><br>
> </form><br>
<br>
</div>Because pagingInc.html also has a <form> tag,<br>
rendered html has nested <form> tag, but it is wrong.<br>
So, move <te:include> tag to the outside of <form> tag.<br>
<br>
<form id="employeemasterListForm"><br/><br>
snip<br>
</form><br>
*<te:include id="tablePages" te:src="/include/pagingInc.html"/>* *// i<br>
included pagingInc.html*<br>
<br>
<br>
><br>
> public int targetPage;<br>
snip<br>
> * empCB.paging(1, targetPage);*<br>
<br>
Who sets the targetPage?<br>
<br>
Because your sample code was too big and not complete<br>
(no one sets the targetPage field), I could not understand<br>
the problem.<br>
If you can, make the sample that is a minimum to reproduction.<br>
<font color="#888888"><br>
<br>
--<br>
</font><div><div></div><div><component name="koichik"><br>
<property name="fullName">"Koichi Kobayashi"</property><br>
<property name="email">"<a href="mailto:koichik@improvement.jp" target="_blank">koichik@improvement.jp</a>"</property><br>
<property name="blog">"<a href="http://d.hatena.ne.jp/koichik" target="_blank">http://d.hatena.ne.jp/koichik</a>"</property><br>
</component><br>
<br>
_______________________________________________<br>
Seasar-user mailing list<br>
<a href="mailto:Seasar-user@ml.seasar.org" target="_blank">Seasar-user@ml.seasar.org</a><br>
<a href="https://ml.seasar.org/mailman/listinfo/seasar-user" target="_blank">https://ml.seasar.org/mailman/listinfo/seasar-user</a><br>
</div></div></blockquote></div><br>