How to show object one by one from the list in page

1
Hi All I have One use case in my project i.e i want to show the list of retrived objects one by one when user clicks on next button on page, I am retriving list of random objects from data base any one please suggestion, Thanks in advance.
asked
2 answers
0

Hi Sarath,

 

I have three suggestions that might work:

  1. Limit the number of objects that you can view to 1 in the list configurations.
  2. Use a non-persistable object that tracks the offset of the list. When the user clicks ‘Next’ then the list offset moves to the next object.
  3. Show one object on a page, and when ‘Next’ is clicked retrieve the next object. (In this way you would not be retrieving the entire list into the session, but only one object at a time)

Hope these suggestions help.

answered
0

Hello Sarath,

 

You can implement your logic as below:

  1. You should have/add an Auto Number attribute to your main entity.
  2. You need an object to keep track of the current number (Tracker in my example).
  3. Every time you hit the Next button, use "Retrieve Objects" action to take one record (Range = First) from database with XPath like [Number > $Tracker/CurrentNumber]. Remember to set Sorting by Number ascending.
  4. Increase the CurrentNumber attribute of the Tracker entity by 1 after a successful retrieval.

Reach me out if you need any help.

answered