Issue with JSDO count method

Posted by tomas.kucera on 14-Apr-2016 10:38

Hi there, I am trying to get Telerik JSDO DataSource to work.

I am following all the examples and guides and it works until I want to implement serverSide paging.

Then I need to implement count method ... I am happily doing that with the following annotations and signature:

@openapi.openedge.export(type="REST", useReturnValue="false", writeDataSetBeforeImage="false").
@progress.service.resourceMapping(type="REST", operation="invoke", URI="/count?filter=~{filter~}", alias="", mediaType="application/json").
METHOD PUBLIC VOID count( INPUT filter AS CHARACTER, OUTPUT numRecs AS INTEGER):

But as soon as I am trying to use it:

dataSource: {
serverPaging: true,
serverFiltering: true,
serverSorting: true,
// batch: true,
filter: { field: "product_category", operator: "eq", value: "SVC" },
type: "jsdo",
transport: {
jsdo: "dsProduct",
countFnName: "count"

I am getting the following error: Could not locate method ''count'' with matching signature in class

The OE is 11.6.1 PAS, Telerik 2016.1.412.

I was trying to look for the countFnName documentation to get some more info about the requirements for the count method, but so far no luck.

Any idea? Thanks!

tom.+

All Replies

Posted by egarcia on 14-Apr-2016 11:02

Hello,

The error message seems to indicate that the method is not present in the class (.cls file).

Could you make sure that that the server is using the latest version of the business entity?

Perhaps, could you try re-starting the PASOE instance (oepas1)?

A troubleshooting tip is to add MESSAGE statements to the READ method, to see if they are written out to the log file.

I hope this helps.

Posted by tomas.kucera on 14-Apr-2016 12:19

Yes, the last thing I haven't tried ... restart PAS did the trick :D

Thanks!

This thread is closed