My catalog file contains a count operation (and the Kendo DataSource definitively calls into that):
operations: [ { name: "count", path: "/count?filter={filter}", useBeforeImage: false, type: "invoke", verb: "put", params: [ ] },
But when using this Catalog to build a Data Source in Kendo UI Builder, the resulting DataSource1.json file shows an empty countFnName:
"children": [ { "type": "data-source", "schemaVersion": "1.0", "name": "CustomerBusinessEntity.eCustomer", "serviceName": "web-CustomerBusinessEntity", "resourceName": "CustomerBusinessEntity", "tableName": "CustomerBusinessEntity.eCustomer", "clientSideProcessing": true, "countFnName": "", "fields": [ { "name": "CustNum", "label": "Cust Num",
Is that expected? Or a problem? On the tools side or mine?
Re-posting my earlier answer (it showed duplicate, but when I went to delete the duplicate post it removed both):
Mike,
I might be wrong here, but:
I would start by making the DataSource ServerSideProcessing , otherwise Count won't make sense:
- Click Edit on a Table inside DataSource1 (on KUIB) and unselect ClientSideProcessing
- When you do that, it will ask you to input the name of the Operation you used to do count . Enter "Count" in there and it should work (worked for me).
For me, to use the server-side paging and sorting, I had to make my backend supports "JFP":
Hope this helps,
Ricardo Perdigao
That's a Shelley (Product Architect) conversation :) I was only trying to help you move forward :)
Re-posting my earlier answer (it showed duplicate, but when I went to delete the duplicate post it removed both):
Mike,
I might be wrong here, but:
I would start by making the DataSource ServerSideProcessing , otherwise Count won't make sense:
- Click Edit on a Table inside DataSource1 (on KUIB) and unselect ClientSideProcessing
- When you do that, it will ask you to input the name of the Operation you used to do count . Enter "Count" in there and it should work (worked for me).
For me, to use the server-side paging and sorting, I had to make my backend supports "JFP":
Hope this helps,
Ricardo Perdigao
Hi Mike,
The count function can be any invoke method name from the catalog. Late in the cycle we introduced the count operation type and it looks like it did not make it to the Designer for V1.
Shelley
Hi Mike,
The count function in the KUIB's 'Edit Data Source' dialog gets auto-populated if the Business Entity's method possess annotation as below (operation as count):
@openapi.openedge.export(type="REST", useReturnValue="false", writeDataSetBeforeImage="false"). @progress.service.resourceMapping(type="REST", operation="count", URI="/count?filter=~{filter~}", alias="", mediaType="application/json").
Sample catalog URI with above annotation is
http://oemobiledemo.progress.com/CustomerService/static/CustomerService2.json
Catalog file possess operation information as:
{ "name": "count", "path": "\/count?filter={filter}", "type": "count", "verb": "put", "params": [] },
Resultant datasource json file in KUIB will have the countFnName by default as below:
"children": [ { "type": "data-source", "schemaVersion": "1.0", "name": "Customer", "serviceName": "CustomerService", "resourceName": "Customer", "tableName": "Customer", "clientSideProcessing": true, "countFnName": "count",
However, we can also have a count operation as an INVOKE. In this scenario, count function (and countFnName in <data source name>.json file) name is not auto-populated in the 'Edit Data Source' section in KUIB.
Hope this helps.
Thanks and Regards,
Anil Kumar.
OK, now with the JSDO 4.3 my I can use a Catalog with a count method of type count - and not invoke - also in my existing Kendo UI app.
Thanks Anil!
Hi All-
Just an FYI that I am going to move this post to the dedicated Kendo UI Builder group that was recently launched.
Thanks
Ed Sullivan