wood burning stoves 2.0*
The moose likes JDBC and the fly likes Pagination with Sorting Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Pagination with Sorting" Watch "Pagination with Sorting" New topic

Pagination with Sorting

Rasika Chitnis
Ranch Hand

Joined: Jun 19, 2001
Posts: 131
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?
Lavern Matthew
Ranch Hand

Joined: Jun 05, 2004
Posts: 38
Take a look at http://valuelist.sourceforge.net.

Matthew Wilson<br />-http://valuelist.sourceforge.net
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60755

Lavern, it isn't really necessary to add this to every topic. Please avoid such spamming in the future.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Dana Hanna
Ranch Hand

Joined: Feb 28, 2003
Posts: 227
Actually, his link proves quite useful to this question.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60755

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 ]
steve souza
Ranch Hand

Joined: Jun 26, 2002
Posts: 860
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.

http://www.jamonapi.com/ - a fast, free open source performance tuning api.
JavaRanch Performance FAQ
jQuery in Action, 2nd edition
subject: Pagination with Sorting
Similar Threads
need help in paging....
Velocity paging
Please help with pagination in JSP?
jQuery Table plugins
Paging and sorting in struts application?