List records not paging when binding to server action

List records not paging when binding to server action

  

On a web site, I cannot get any pages after page 1 to render when using the pager and list records widget together.  I have a list records widget that binds to the output of server action in the base layer of the application.  In the preparation I am getting the search results, then passing those to the list records. 

If I was pulling directly from an aggregate, I understand the recommendation is using the refresh data widget.  However since I have a base layer to the application, that widget isn't applicable since it doesn't support refreshing a server action.

Preparation:

List Records widget config:

List Nav config:

The initial search results render okay.  Then when you click the pager, the RefreshTable action runs:


Unfortunately, pages 2+ won't show any records even though the page count has advaced:  

It seems that the underlying data to the list records widget is not updating for some reason.  Ideas?



can you share the oml, because it should work.


I can share the OML privately.  How could I do that?

Hi David 

Go to the profile of J and send him private message. 

If you want others to have look at your problem, you can share that part only by cloning application and deleting other code. 

I created a demo project with the same structure and attached the OML files for the 2 layers in a zip file.  The behavior is about the same with the pager not working in the RefreshTable action.  Thank you in advanced for having a look.


Solution

This issue is caused by the server action using server-side paging to return rows.  The start index property was advancing from 0 for page 1 to 10 for page 2, but there were still only 10 records being returned from the server each time (albeit the next 10 rows in the record set).  Therefore the table was showing records 11+ for a record set with 10 records.  Now it seems I cannot use either the built-in StartIndex property or the pager control because they are built to page through a dataset that is fed whole.

Solution

This was solved by disconnecting the pager widget from the list records widget.  I put the table widget id="EquipmentListDummy" instead of equipmentlist.id so the pager would track the selected page in session memory but not try to update the list records widget.  Then I accessed the pager's selected page using List_Navigation_GetStartIndex("EquipmentListDummy") and passed it to the server action to retrieve the next page.  The revised project files are attached.