tags:

views:

10

answers:

0

I'm building this site using jsp / servlets on the backend.

The first page (or "search" page) allows one to search for records from a table, and also allows the user to sort the records. The sorting mechanism is quite complicated, and is not just a matter of appending an "order by" to an sql query.

The first page then also fills in the results after the user hit's "search". Basically, it's just a list of the items in "short" format, where each item also contains a link to display the item in the second page. The sorting mechanism is run in the first page, while the list is being created. The mechanism uses java code to sort, not sql (for reasons I won't get into, but they are definitely needed).

When the second page (or "details" page) loads, it grabs the id of the record from the url, then displays the details for that record.

Problem is that we now want to put "back" / "next" type iteration features in the details page, so that the users don't have to return to the search or list page to then navigate to the next item in the list.

I'm looking for some ideas on how to implement this as something tells me I'm missing the obvious here. Basically, the problem is that the details page has no concept of the sorting used in the search page, and so has no idea of what the next or previous record in the list should be. There are a few ideas running around but they all suffer from one problem or the next.