Pagination of a list REactive web

Hi, i don´t know how to paginate a List Widget that is getting data from a list (local variable) and not from an aggregate. I undertand how it works for an aggregate but i can not find a solution for a list. 


i am workin on reactive web, thanks!

Hi!

You can use webblock Pagination from OutsystemsUI:



Hope it helps!


BR,

Luis

Hi Adrian,

What, according to you, is the difference between the List coming from an Aggregate or being a List of Structures? The are both Lists, and thus both can be paginated. What exactly did you run into?

Adrian Poveda Sanchis wrote:

Hi, i don´t know how to paginate a List Widget that is getting data from a list (local variable) and not from an aggregate. I undertand how it works for an aggregate but i can not find a solution for a list. 


i am workin on reactive web, thanks!

Please look for the example in the attachment with a local variable list with pagination


Hi Luís,

Your pagination is still based on a query that's being refreshed. But I don't think the OP has a query at all.


Kilian Hekhuis wrote:

Hi Luís,

Your pagination is still based on a query that's being refreshed. But I don't think the OP has a query at all. Also, you don't use a List but a Table.


Yes, You are right. That is only an example, can you change that to an example without query?
We also need to understand the use-case: How the data is populated on the variable?

For example, ig you have a action to return that list with a query inside, you can pass StartIndex value as a input and use it in the action.

Ok, I think I have a solution, see attachment. The trick is to have the full list available (in my case a data action that hides a query, but it could be a REST call or whatever) and a partial list that is displayed. When the pagination changes (and initially on fetch of the data), you reassign the partial list, by using a For Each that has the new start index as start, and your list length as max iterations.

Kilian Hekhuis wrote:

Ok, I think I have a solution, see attachment. The trick is to have the full list available (in my case a data action that hides a query, but it could be a REST call or whatever) and a partial list that is displayed. When the pagination changes (and initially on fetch of the data), you reassign the partial list, by using a For Each that has the new start index as start, and your list length as max iterations.

Yes, that is also other good solution