Stan,
I reformulated my question thanks to your helpful clarification. Please see below for a *hopefully* clearer articulation of my question.
I am thinking that maybe a better forum for this question might be a more webapp oriented one, like say the
JSP forum, and I might post it tomorrow on that--I will reply back on this if I end up doing that. Please feel free to give this a read. Thank you for all the help.
-Jim
I am interested in using a tabular result set display binding tag library like either DisplayTag (Sourceforge) or DataGrid (Apache), and paging results (from a database). I can do all of this without any problems; the question I have is a question of result collection object scoping, and potentially multiple browsers open for a user session.
The problem/challenge that I have is that if I put the List/Collection object for the search result in session scope, and the user opens another browser (via ctrl-N, whatever), then any subsequent interrogation done in the new browser window will clobber the session scoped result object which was originally created by the first browser interaction.
Note: I'm assuming there is no clear way to page through a request scoped collection, because the request lifecycle has ended when the first page is rendered on the browser.
Also, to clarify, the session scoped collection is the first up-to-500 rows of some ad-hoc database search/interrogation; on the search form, the user specifies some mandatory and optional search criteria, and a dynamic query is executed populating the (currently session) scoped collection with results. I *do not* want to requery the database (not even partial result set queries for page subsets) as the user pages paging through these potentially up-to-500 results (this is not an option, sorry).
At this juncture some
EJB adepts might suggest "stateful session EJBs" are the solution, but I would personally prefer to avoid EJB altogether if possible. Maybe that's really the most natural approach though? Anyway, if after searching/retrieving some initial results, but before paging to say the 2nd page, suppose the user opens another browser window and goes back and performs a different ad hoc search/interrogation, repopulating the same session scoped collection which the first browser window is supposed to be paging through, clobbering the previous results. My dilemma is what's the best way to handle this problem.
What I'm hopefully kind of looking for a is general purpose technique/approach/standard-practice (hopefully strictly webapp, no EJB, if possible) which might allow users to page results concurrently in multiple browser windows.
Thank you very much.
-Jim