Pagination not working

Posted by Apil Koirala on 22-Nov-2016 07:44

Hi

I built a screen using Kendo UI Builder with grid in it.

Then I  used count function in the data provider so that I can get the data from server page by page.

I have set the page size as 20. I have also created ReadCustomer method to get data with filter as input parameter (as specified in https://community.progress.com/community_groups/openedge_kendo_ui_builder/w/openedgekendouibuilder/2879.kendo-ui-builder-launch-demo)

I have implemented count (with filter as input parameter) method as well. However I always get all the records from the server on the screen.

I examined the call being made to the server using Chrome developer tools and found out that there is no filter parameter specified in the call. I am not sure where do I need to change to make this working.

I have attached the Catalog and the source files used. I would appreciate any help on this.

[View:/cfs-file/__key/communityserver-discussions-components-files/255/customerdata.zip:320:240]

Thanks,

Apil

Posted by Sanjeva Manchala on 23-Nov-2016 03:58

Hi Apli,
 
Currently PDS OE tooling doesn’t have support for “count” operation in catalog generation, so it is generating as "type": "invoke" for “count” function. So, please update the catalog file manually for count operation as below:
Default values in catalog for count:
{
                    "name": "count",
                    "path": "\/count?filter={filter}",
                    "useBeforeImage": false,
                    "type": "invoke",
                    "verb": "put",
                    "params": [
                        {
                            "name": "filter",
                            "type": "QUERY"
                        },
                        {
                            "name": "numRecs",
                            "type": "RESPONSE_BODY"
                        }
                    ]
  }
Updated values in catalog for count:
{
                    "name": "count",
                    "path": "\/count?filter={filter}",
                    "useBeforeImage": false,
                    "type": "count",
                    "verb": "put",
                    "params": [
                        {
                            "name": "filter",
                            "type": "QUERY"
                        },
                        {
                            "name": "numRecs",
                            "type": "RESPONSE_BODY"
                        }
                    ]
  }
 
 
May be you need to delete the existing data provider and recreate the data provider after changing catalog values. Let us know what you find.
 
Hope this helps,
Sanjeev.
 

All Replies

Posted by Sanjeva Manchala on 23-Nov-2016 03:58

Hi Apli,
 
Currently PDS OE tooling doesn’t have support for “count” operation in catalog generation, so it is generating as "type": "invoke" for “count” function. So, please update the catalog file manually for count operation as below:
Default values in catalog for count:
{
                    "name": "count",
                    "path": "\/count?filter={filter}",
                    "useBeforeImage": false,
                    "type": "invoke",
                    "verb": "put",
                    "params": [
                        {
                            "name": "filter",
                            "type": "QUERY"
                        },
                        {
                            "name": "numRecs",
                            "type": "RESPONSE_BODY"
                        }
                    ]
  }
Updated values in catalog for count:
{
                    "name": "count",
                    "path": "\/count?filter={filter}",
                    "useBeforeImage": false,
                    "type": "count",
                    "verb": "put",
                    "params": [
                        {
                            "name": "filter",
                            "type": "QUERY"
                        },
                        {
                            "name": "numRecs",
                            "type": "RESPONSE_BODY"
                        }
                    ]
  }
 
 
May be you need to delete the existing data provider and recreate the data provider after changing catalog values. Let us know what you find.
 
Hope this helps,
Sanjeev.
 

Posted by Apil Koirala on 23-Nov-2016 05:32

Thanks Sanjeev!

It works. Hope to get updated version soon with the missing functionalities.

Regards,

Apil

This thread is closed