Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Implementing Sorting with Pagination in Spring MVC

 
shwetank sharma
Greenhorn
Posts: 10
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to implement paging and sorting on my Spring MVC application.

Paging I have easily achieved using PagedListHolder and working fine, now I need to implement sorting on each page and column.

Also the sorting need to be done on page not on complete list.

Restriction is that we cannot use Display Tag library.
 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
PagedListHolder takes a SortDefinition. Create a new MutableSortDefinition if the one registered for you with default values is not suitable.

Then you can call doSort on the pagedListHolder.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic