Try OpenEdge Now
skip to main content
Web Services
Creating OpenEdge REST Web Services : Data Object Services : Coding Business Entities to implement Data Objects : Updates to allow access by Kendo UI DataSources and Rollbase external objects
 
Updates to allow access by Kendo UI DataSources and Rollbase external objects
In both current and prior OpenEdge releases, the Business Entity generated for an OpenEdge Data Object assumes that the filter parameter of the Data Object Read operation can contain a string value of any format that is agreed upon between the developer of the client mobile app and the OpenEdge developer. For a Classic Server project using the Express setup option or a PAS for OpenEdge Server project whose Business Entity inherits the OpenEdge.BusinessLogic.BusinessEntity abstract class, Progress Developer Studio for OpenEdge generates Business Entity code that looks for an ABL WHERE string as the agreed upon value of this parameter, but otherwise leaves it up to the OpenEdge developer to provide the code required to handle a different format for the filter value.
If you are building a mobile or Web app using Kendo UI development tools, to allow the Kendo UI to access OpenEdge data using the server filtering, sorting, and paging features of the JSDO dialect of the Kendo UI DataSource, you must manually update the ABL code in the Business Entity to handle a new filter string format and add a new Data Object Count operation method. For more information on using Kendo UI to build mobile and Web apps using the JSDO dialect of the Kendo UI DataSource, see the online Progress Data Objects Guide and Reference at https://documentation.progress.com/output/pdo/.
If your Business Entity is intended to implement a Rollbase external object (a Rollbase object created to access an OpenEdge Data Object resource), you must provide similar updates for use by the Rollbase server to preprocess data that the Rollbase external object reads from the OpenEdge Data Object. For more information on Rollbase external objects, see the following Rollbase documentation: https://documentation.progress.com/output/rb/doc/index.html#context/rb/rb_oe.
Developer Studio for OpenEdge does not currently generate all the annotations to configure the Data Service Catalog or the behavior in a Business Entity that are required to provide OpenEdge data to a Kendo UI DataSource using its server preprocessing features, even when you build a Business Entity that inherits from OpenEdge.BusinessLogic.BusinessEntity. Therefore, you must manually update the Business Entity to add:
*Annotations to handle the filter parameter value of the Data Object Read operation method as an OpenEdge-proprietary JSON Filter Pattern (described below). This is required to implement the Read operation for any JSDO accessed by the Kendo UI DataSource, allowing it to use its server preprocessing options. Rollbase also relies on a similar JSON Filter Pattern to preprocess the data read by Rollbase external objects.
*Code for a Data Object Count operation method that returns the total number of records available for access in the OpenEdge database (that is, in the result set) according to the specified JSON Filter Pattern options. This Count operation method is required only if the DataSource uses server paging, because Kendo UI needs to know the total number of records available in the server result set for a given DataSource in order to manage server paging on the client.
Unlike the manual annotations required to specify the JSON Filter Pattern value passed to the Read operation method's filter parameter, you can add the required annotations to specify a method as a Count operation method using the Define Service Interface wizard of the Developer Studio for OpenEdge. These annotations then identify the method to the client DataSource through the Data Service Catalog without the client programmer having to explicitly call it or identify it to the DataSource as the Count operation method.
* Understanding the JSON Filter Pattern (JFP)
* Adding the Count operation method
* Sample Read operation updated to handle JFP input and server paging