Hi Ishita,
I believe you are facing a classical problem known as "query isolation". Because you issue several queries against the database to fetch only rows comprised in one page you aren't aware of what happens in meantime. This problems appears as well for added rows (this behaviour provokes "page drift").
I don't think that scrollables results can help you in a web application because this will imply that the cursor has to keep opened (using SCROLL_INSENSITIVE mode) in order to provide next pages without reflecting changes made by others. I fear it will be very expensive.
Maybe some solutions for your case:
- retain all rows in memory (like
ValueList or
DisplayTag - not reasonable for a large result)
- create a temp "static view" for each query with all result but fetching by chunks
- loads all id in memory and don't delete rows (only flags them with "deleted"). When user ask for a new page, fetch rows within a page by id (take at look at
http://www.ilikespam.com/blog/paging-la ... a-lazylist).
- or try, but is complicated, to adjust the offset of rows dynamically in order to display "pulled" or "drifted" rows correctly.
I'm not convinced that there is a perfect solution. It depends for each use case.