This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Servlets and the fly likes Scrollable sections in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Servlets
Bookmark "Scrollable sections in JSP" Watch "Scrollable sections in JSP" New topic

Scrollable sections in JSP

Seema Hanji
Ranch Hand

Joined: Jan 29, 2001
Posts: 37
I am trying to find a best solution for displaying results in sections on a JSP with <Previous> and <Next> functionality for each section to navigate within section.
For ex: User enters a search criteria to get records for specified years . On results jsp page, results should be displayed in seperate section for each specified year. Each section should display top 5 records for the year and each section should have <Previous> and <Next> buttons. When any of these buttons pressed , previous/next set of 5 records should be displayed for that year.
I think Navigating at query level in servlet may be too expensive. Holding Vector of unique keys of records for each section may also be expensive , as there can be upto 20-30 sections.
Any suggessions are welcome.
-Thanks in advance
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17033

Unless those are REALLY long keys, I wouldn't feel too guilty about keeping only 20 or 30 of them in a vector! Unless, maybe there's a thousand users all doing this at once.

An IDE is no substitute for an Intelligent Developer.
Seema Hanji
Ranch Hand

Joined: Jan 29, 2001
Posts: 37
You mean one seperate Vector for each section ?
So, there can be 20-30 Vectors ?
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Scrollable sections in JSP
It's not a secret anymore!