ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zarar Siddiqi" <zarar.sidd...@utoronto.ca>
Subject Re: what does the PaginatedList method means ?
Date Thu, 13 Apr 2006 02:21:51 GMT
All the questions you are asking can be easily answered by writing some code 
and playing around with paginated lists for about fifteen minutes.  Maybe 
you should consider using DisplayTag instead of paginated lists since that 
will make your life easier and you won't have to worry about writing Java 
code to handle paging.  Using either method carries approximately the same 
performance hit.  As mentioned earlier, if performance is your goal, write 
vendor specific SQL code to return smaller result sets.

Zarar


----- Original Message ----- 
From: "John Chien" <john.chien@ncmail.net>
To: <user-java@ibatis.apache.org>
Sent: Wednesday, April 12, 2006 3:19 PM
Subject: what does the PaginatedList method means ?


> Dear Sir:
>
> After we called the iBatis queryForPaginatedList(), we get a list of
> type PaginatedList.
> Let us call it queryResultList;
> The PaginatedList has several methods like:
>
> void gotoPage(int i);
> boolean nextPage();
> boolean previosPage();
>
> What does these methods mean ?
> What I want is to get a list to be returned to client side to be 
> displayed.
> Let us call it toBeDisplayList;
>
>
> 1) I want to go to page 5, so I write the following statement
>
> queryResultList.getoPage(5);  What does this mean ?
>
> Suppose the queryResultList have 600 element originally, and each page
> display 30 elements,
> after calling queryResultList.getoPage(5) , does the queryResultList
> become a subList that begins with the 121th element ?
>
> 2) I am in page 1, and I want to go to next page
>
> boolean ok = queryResultList.nextPage();
> The ok is true.
>
> Does the queryResultList become the sublist that begins from 31th element 
> ?
>
> Do I need to call a subList method to return a sublist that I want to
> display ?
>
> Thanks,
>
> John Chien
>
>
>
>
>
>
> 



Mime
View raw message