You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Nathan Maves <Na...@Sun.COM> on 2005/06/10 00:36:22 UTC
Question when using a pagenated list
I have a list of result objects that were returned by a
queryForPaginatedList. I need to add some information to this
object. But if I loop over the resulting list it only added the date
to the first n, in this case 25, rows.
How can I make sure that the data is loaded to the next set of 25 rows?
Nathan
Re: Question when using a pagenated list
Posted by Clinton Begin <cl...@gmail.com>.
So, if I understand correctly, you're:
1) Querying for a paginated list
2) iterating over the list
2.1) for each item adding some additional information
3) Returning the list to some consumer
4) when the consumer switches to the next page, the items contained do not
hold the data from 2.1 above
If that's correct, then here's what you might do:
1) Implement PaginatedList with your own wrapper.
2) instead of iterating over the list at the time of the query (probably in
your DAO right now), wrap the call to nextPage()/prevPage() etc. to add the
additional data at that time.
Otherwise, you might consider using something other than paginated list.
Cheers,
Clinton
On 6/9/05, Nathan Maves <Na...@sun.com> wrote:
>
> I have a list of result objects that were returned by a
> queryForPaginatedList. I need to add some information to this
> object. But if I loop over the resulting list it only added the date
> to the first n, in this case 25, rows.
>
> How can I make sure that the data is loaded to the next set of 25 rows?
>
> Nathan
>
>