views:

47

answers:

1

Hi,

In my web application I got a search results list (SR). The search is heavily parametrized. Each element on the list can be clicked and then the element's own page (EP) is displayed.

Now, the customer wants to have the ability to go to previous and next element from the search list that was used to enter the element page.

How would you implement this? I can either pass the search conditions to the EP and the element's index on the list, then prev/next would just mean to rerun the search query, get previous / next index and display it (still passing the conditions and new index).

Or is there a better approach?

+1  A: 

How intensive is your search process? It sounds like something you don't want to execute anymore than necessary. What if you when you render the search results you also store in a list the unqiue EP IDs on the server. You can then navigate through that using indexes for prev/next and the unique ID of the EP element to load details? You can then also store the query term and repopulate the search results with a 'Back to Search' link?

Dave Anderson
Storing IDs of EPs sounds doable. One problem is sometimes there are really lots of results (like, dozens of thousands) if the search parameters allow...
kender