The following steps are involved in the handling of a table pagination request:
1 Table page sends a pagination request to the server side via the AJAX channel.
2 beforeExecuteBizOp(): This step is used for customer extension. It is designed to perform logic before calling the business operation; the logic is implemented on the project-level. For example, it retrieves required parameters from the received data and enters the parameters into the processor context.
3 initBizOp(): This is a private method, and it initializes the business operation instance and related resources. For example, it creates the business operation object and chains its context to the parent context, and register an event listener for the business operation.
4 handleBizOpInputMapping(): This step used for customer extension. The developer who creates a new pagination operation can extend this method to add data mapping from the parent/processor context to the business operation context.
After this, the handleBizOpInputMapping() method uses the user-defined input data mapper, which is defined in the XUI tooling, to map data from the process context to the business operation context. An input mapper is a mapper that defines how processor context data is mapped into business operation context data so that the business operation can retrieve information for execution later.
There are four types of input mappers:
initialInputMapping
Is used when the table is shown on first loading.
nextInputMapping
Is used when the total table record number is unknown, and the next page event is fired.
previousInputMapping
Is used when the total table record number is unknown, and the previous page event is fired
directInputMapping
Is used when the total table record number is known, and a new page data request is fired.
5 Invokes the business operation to retrieve the real data. When execution is completed, the business operation fires an event.
6 Based on each event, it uses different output mappers to map the business context data into processor context. Candidate values are “error” and “ok”. “error”: it will use the errorOutputMapping; “ok": it will use the normalOutputMapping.
7 handleBizOpOutputMapping(): This step is used for customer extension. The developer who creates a new pagination operation can extend the handleBizOpOutputMapping() method to add data mapping from the business operation context to parent/processor context.
8 afterExecuteBizOp(): This step is used for customer extension. It is designed to perform logic after business operation execution. The logic is implemented at the project level; for example, entering the necessary data into the pagination operation context
9 updateReplyData(): This is an internal method that organizes the formatted business data as structured data for table page usage.