Hi gods! I have a JDBC adapter service that performs a query that gets around 3000 results. Now i need to show this in a DSP page that has the ability to display it in pages from 20 to 20. Actually i’m able to know the total count of elements queried, but i can’t build a <previous><1><2><3>…<next> menu of links to refer to the proper set of results. Can anyone help me with it? sample code would be very appreciate!!..thanks a lot everybody!!
You would typically want the pagination to occur on the DB, and not on the DSP page after the data set is retreived since you would be required to get/store the lump sum of data (3000 results). So your query should input the number of results to return, the row to start, etc. to perform the pagination.
If that’s not possible, I suppose you could write the entire data set to a file, then page through the file, but that doesn’t sound like such a good idea.
actually i have written a query that has the ability of retrieve just a part of the entire data set, specifying the start row, the number of results, etc.
Now my problem is to build the links module, where i can have a previous>1>2>3…etc group of links, with the right parameters to call this query.
Does anyone know how can i build this one?
Abel - Brian’s point makes sense. From what I recall, due to their ability to handle things like database inserts occuring between distinct queries for the same user, database cursors may be a better implementation.
If you have TN installed, have a look at the WmTNWeb DSP’s which implement a version of pagination when you view a content part of a document:
Analysis > Transactions > Document Details > Document Part Contents
There is also a ‘set page size’ control on that page.