Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

jsp paging & sorting problem

843836May 4 2004 — edited Feb 8 2005
hi all,
i am facing a problem while displaiyng my pages. i hav a list of records of which i have to display a predefined no of records at a time,say 6. i am getting the list from database and then putting it in session. on my page i would give links to page numbers to view next set of records, much like what google does.
now this is working fine. i have an option on my page to sort the set of records, the sorting being done by my query. problem arises when i use this sorting functionality, the sorting is performed on the entire list, not on those which are displayed... the example might make things clearer.

if i have a 6 records and i display 4 records at a time, so on my page 1 i will be able to view record no. 1, 2, 3, 4. now when i sort them i see record no. 6, 5, 4, 3. ideally i would like to see the records 4, ,3, 2, 1.

i hope things are clear....what can be done to tackle this...

thanks in advance...
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 8 2005
Added on May 4 2004
11 comments
265 views