Win a copy of Spring Boot in Practice this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Pagination with Sorting

 
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have seen many threads here and also on TheSeverSide.com that discuss strategies for paging the result set for large search operations. But it did not mention how to handle sorting with paging. Any body has any good ideas about implementing paging with sorting?
thanks
 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Take a look at http://valuelist.sourceforge.net.
 
Sheriff
Posts: 67651
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Lavern, it isn't really necessary to add this to every topic. Please avoid such spamming in the future.
 
Ranch Hand
Posts: 227
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, his link proves quite useful to this question.
 
Bear Bibeault
Sheriff
Posts: 67651
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No doubt, but it is not necessary to post it on every previous paging question asked. Once will do just fine, and it can be posted as an answer to future questions of the same kind. Goodness knows it gets asked enough.
[ June 05, 2004: Message edited by: Bear Bibeault ]
 
Ranch Hand
Posts: 862
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As part of the FormattedDataSet codeline I have an array Sorter if that is what you wish to sort. I use it to perform the clickable sorting that you see on the live demo homepage at http://www.fdsapi.com.

In general it works like similarly to an order by clause on a select statement, but for arrays instead (i.e. order by col1 desc, col2 asc). You can also provide your own Compare logic. The javadocs are also available at the link.


 
reply
    Bookmark Topic Watch Topic
  • New Topic