This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Spring and the fly likes Implementing Sorting with Pagination in Spring MVC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Implementing Sorting with Pagination in Spring MVC" Watch "Implementing Sorting with Pagination in Spring MVC" New topic
Author

Implementing Sorting with Pagination in Spring MVC

shwetank sharma
Greenhorn

Joined: Jan 09, 2011
Posts: 10

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.

~~Cheers~~
Shwetank
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1632
    
    7

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.


[How To Ask Questions][Read before you PM me]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Implementing Sorting with Pagination in Spring MVC
 
Similar Threads
[Spring Web Flow 2] Can Spring Web Flow work with Spring Web MVC?
What is the difference between static vs dynamic in SQLJ
Paging and Sorting in JSF
How to do Paging
jgrid - Spring MVC CRUD operation with pagination and without page refresh