1

I am really struggling to understand a way to implement pagination in Spring MVC and I have my deadline coming later this week. I have been stuck on this forever.

My problem is as follows:-

  1. We get a list after accessing the web-services of our client.
  2. The only thing that I can work with is the list that I have.
  3. I have to implement Pagination using this Spring.

Can someone explain the flow of pagination in detail?

Tiny
  • 27,221
  • 105
  • 339
  • 599
Mayank Sharma
  • 203
  • 1
  • 14
  • Spring has no special support for pagination. You have to implement it on your own. Pagination just requires page size and offset that you need to pass. See [this](http://stackoverflow.com/q/2245035/1391249) question. The accepted answer discusses about `PagedListHolder` in Spring that you can use to implement pagination **on the front-end** (if no database is involved and the list of records is limited). – Tiny Aug 11 '14 at 08:06
  • you have to pass start and limit(offset) from front end, and its always return requested no of rows and total rows without limit. you need technical help ? – Yogesh Prajapati Aug 11 '14 at 08:17
  • @yogeshprajapati: Yeah I need a little technical help, I can show you my code and explain you the logic involved. Please drop your email id, my email id is: mayank.placid@gmail.com – Mayank Sharma Aug 12 '14 at 14:19

1 Answers1

0

Have a look at this plugin. Very configurable. The only catch is that you have to use jquery on your jsp/html page which is not bad at all. So get the list from the web server and dynamically construct a table from the list. configure data tables and let it handle the render. Spring has no support for front end development.

http://www.datatables.net/

Khush
  • 853
  • 2
  • 8
  • 21
  • Khush can you have a look at my code? I am really struggling to understand pagination in Spring. – Mayank Sharma Aug 13 '14 at 06:50
  • @MayankSharma Spring is not a front end framework. It wont support pagination. – Khush Aug 13 '14 at 08:26
  • But there must be some way to implement pagination in Spring right? Have you ever worked on pagination? Can you have a look at my code? – Mayank Sharma Aug 13 '14 at 10:59
  • Thanks for the links Khush, Can you help me as I have a deadline to meet. Just a little help would do. My email Id is : mayank.placid@gmail.com – Mayank Sharma Aug 16 '14 at 18:52