Get data request

A typical request of the data in DWKIT contains following parameters:

  • viewName - the name of the view
  • operationType - Create, Edit or Copy
  • other parameters necessary for getting of the data: filter, sort, additional search parameter etc

Next chaining occurs on the web server and causes the getiing of the data:

  1. Verification that the current user has the right to view data from the specified view determined by viewName . If not - then the request processing is interrupted, and the error message returns.

The next steps depend on operationType.

For Create:

  1. Calling of the init for create function which has been bonded with view. In this function is possible to fill any fields in initialized object.
  2. The data is formatted to JSON and returned to client.

For Copy:

  1. Calling of the filter function which has been bonded with view. In this function is possible to change the filter which has been passed from the client.
  2. Getting the data from database using filter and sort via DWKIT ORM.
  3. Calling of the after request function which has been bonded with view. In this function is possible to change obtained data.
  4. Calling of the init for copy function which has been bonded with view. In this function is possible to change obtained data.
  5. The data is formatted to JSON and returned to client.

For Edit:

  1. Calling of the filter function which has been bonded with view. In this function is possible to change the filter which has been passed from the client.
  2. Getting the data from database using filter and sort via DWKIT ORM.
  3. Calling of the after request function which has been bonded with view. In this function is possible to change obtained data.
  4. The data is formatted to JSON and returned to client.

Get data request