DSP and Pagination

HELP - Need assistance on how or can this be done with DSP. I would like to incorporate into my DSP page a pagination (<< prev next>>). My file has 3 levels as follows:

  • Batch A (First Level)
  • Batch B
  • Batch C
    • File a (Second Level)
    • File b
      • Record 1 (Third Level)
      • Record 2
        : :
      • Record 10
      • Record 11
        : :
      • Record 12
        : :
      • Record 22

I would like to put the pagination at Record (Third Level) and display first 10 records, next 10 records, etc.
Can I use pagination, if so how should I do this? any samples?
Thank you in advance.

Please check this thread,if it helps
[URL=“wmusers.com”]wmusers.com

HTH,
RMg

The first time I saw this question posted (in the thread referred to by rmg in his reply), I tried to think of a simple solution but couldn’t find one. Yesterday once again I was forced to think of this and despite my reluctance to lean towards java to get a solution, I had to do just that.

With the presumption that the results are retrieved from a database and re qurerying the database is too expensive, I wrote a couple of generic java services. The first one takes the the following inputs in form of a document:

  1. results (docList) of the db query,
  2. a page size (to be determined by the developer - denoting no. of results per page) and
  3. a query id - uniquely identifying this result.

The service stores the results (docList) in the session with key=queryID and returns only the first n (n = pageSize) results, along with the total number of possible pages (with the given pageSize).

The DSP plots these results as it ought to, stores the queryID as a hidden field and creates link for number of pages (ie 1 to total number of pages). Clicking on any of these links submits the request to the second java service and passes the queryID and the number of the page requested (depending on the pageNum link clicked). This service then proceeds to get retrieve the original results from the session (using the queryID) and does a few calculations to determine what set of results are to be returned.

I tried this approach and it works - however… I carried out this exercise just to see the feasibility and it may not be the right approach in your scenario. Storing results in session (esp if the result set is heavy) can be expensive. Guruz with greater experience may give pros n cons of this approach.

HTH, Rohit