3

I have a model I need to paginate (Book listings - as explained in a previous question.).

This seems like a common enough feature that I would expect some pre-built solutions for it without having to build a custom solution.

Does Spring (3) have support for pagination?

Community
  • 1
  • 1
Linc
  • 673
  • 2
  • 11
  • 16
  • possible duplicate of [How to implement pagination in Spring MVC 3](http://stackoverflow.com/questions/2245035/how-to-implement-pagination-in-spring-mvc-3) – Pascal Thivent Sep 14 '10 at 19:42

2 Answers2

4

There are some helper classes included. For instance there's a class called org.springframework.beans.support.PagedListHolder. There are a number of solutions to pagination depending on what trade-offs you're willing to make, so there is no one single accepted way to do it. This article has a good overview.

Nathan Hughes
  • 94,330
  • 19
  • 181
  • 276
1

Spring Data has support for web pagination, as described here:

http://static.springsource.org/spring-data/data-jpa/docs/current/reference/html/repositories.html#web-pagination