982
Views
8
Comments
Pagination of a list REactive web
Question

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!

2021-07-14 09-27-33
Luís Cardoso

Hi!

You can use webblock Pagination from OutsystemsUI:



Hope it helps!


BR,

Luis

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

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?

2021-07-14 09-27-33
Luís Cardoso

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


ReactTest.oml
2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

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.


2021-07-14 09-27-33
Luís Cardoso

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.

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

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.

PaginatingList.oml
2021-07-14 09-27-33
Luís Cardoso

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


2018-11-06 16-25-07
Mark Picton

Thanks @Kilian Croese, just had same issue.. my table is based on a local List variable. I implemented pagination same way as in your OML and now working perfectly. Thanks!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.