Paginated list with VL

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
dvanoni
Posts: 32
Joined: Wed Dec 02, 2015 3:47 am
Location: Chiasso - Switzerland

Paginated list with VL

Post by dvanoni » Mon Apr 11, 2016 3:57 pm

Hi!

Is it possible to create a paginated list using the #PRIM_LIST component? If yes, where can I find an example?

Thanks

User avatar
Stewart Marshall
Posts: 417
Joined: Thu Nov 05, 2015 5:25 pm

Re: Paginated list with VL

Post by Stewart Marshall » Thu Apr 14, 2016 12:37 pm

The List control has no automated features for pagination. However, this is a very simple feature to replicate, depending on the volume of data you're accessing.

For relatively small tables, say around 1000 records, it may well be reasonable to load a complete set of data in to a working list or data model and then show a page at a time. Performance here will be excellent as all the data will be in memory.

However, for large volumes of data jumping to a "page" of data somewhere in the middle of a database has always struck me as an odd thing to want to do. IMO, a far better solution is to provide more precise querying features so that the user can minimize the volume of data in play.

Do you have a specific use case in mind?
Stewart Marshall

Independent IT Consultant
www.marshallfloyd.com.au

User avatar
Stewart Marshall
Posts: 417
Joined: Thu Nov 05, 2015 5:25 pm

Re: Paginated list with VL

Post by Stewart Marshall » Thu Apr 14, 2016 3:02 pm

Attached is a simple list example showing the ideas from my previous post.

This uses a working list of 1200 items and show them 15 at a time. As you'll see the performance is excellent.

It's worth bearing in mind here that downloading a few thousand records to the client is of little consequence, especially for applications running on an intranet. 3000 records at 300 bytes per item is only 900Kb and that's far less than an initial load of something like FaceBook which is typically over 1Mb.

Provided you don't try to make the browser show them all at the same time, the performance will be excellent.


Regards
Attachments
PaginatedList.zip
(10.52 KiB) Downloaded 144 times
Stewart Marshall

Independent IT Consultant
www.marshallfloyd.com.au

Post Reply