Add manual pagination to an interface

Hi everyone,

I have an interface which displays a list of documents (UI_ListOfDocument), and originally user need to choose one document in the list to preview it (UI_Preview  will be displayed accordingly showing that chosen document's content), then click back to the list to choose another document for preview. 

The request is to create a pagination in the existing interface, so that user just needs to click the pagination buttons to see the next/ previous document preview. I already built the interface for the pagination, but was having trouble in linking the document to it to make it work. 

Currently, all related document from the data table are queried using a!queryEntity(), and are saved in a local variable, including it's content. 

If anyone has done this before, please leave an advise if possible. Thanks for your helps Smiley

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    Can you clarify why this requires Manual Pagination?  After reading your post a couple times I'm not even sure "pagination" is really quite what you're after.  To me it sounds more like you want a read-only grid listing a batch of queried documents-by-id, allowing the user to click a link to open one of them in a previewer, then adding "previous / next" links to the Previewer interface to allow the user to quickly browse among the existing list of doc IDs without having to click back up to the parent interface over and over again.  Am I far off?

    If I am pretty close: This is all pretty straightforward to implement, and it would be a lot easier to give you advice if you could attach some sample code for what you have so far, screenshots, and a detailed breakdown of what you're having trouble doing so far.  As usual, when providing sample code (of any length, but especially for anything longer than just a couple lines), please use the Code Box functionality found under the "insert" menu ("Insert" --> "Insert Code").

    IMHO this could all be built into a single interface pretty easily, though certain things could be simplified a bit by separating the "document preview with links" functionality into a child interface (that could be done afterwards though).

  • Hi Mike, Harsha's above solution was absolutely what I need :D. And your assumption is correct by the way! Thanks for your time supporting :)

Reply Children