Skip to content
Advertisement

PL-SQL, Oracle Apex: How can I add pagination to a PL-SQL dynamic content table?

I created a PL-SQL dynamic content report in Oracle Apex, however I am having trouble figuring out how to add pagination to it. I have too many rows and therefore adding pagination to the table will provide a better user experience. My sample code looks as follows:

BEGIN

JavaScript

END;

Advertisement

Answer

  • Create two hidden items on the page, say, Pxx_START_ROW and Pxx_PAGE_SIZE.

  • Modify your query to be paginated. That will require that you sort the data somehow assuming you want the results to be deterministic. So rather than

    select * from exampleTable

you’d have

JavaScript
  • Then create a process that updates Pxx_START_ROW when you click some sort of a “previous” or “next” button. You’ll probably want to update your dynamic process to generate those buttons because I’d expect you’d want them to be part of the table though functionally you could create those buttons in a different region.
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement