Standard actions of the client app

DWKit comes with a set of predefined client actions. This section describes their parameters and usage examples. You can read more on client actions in the Actions of the client application section.

Actions to work with grids

gridCreate

Opens a window that allows you to edit a new record. The form or business flow that gets opened are specified in grid settings. Usually it is mapped to a button-raised event.

  • name: gridCreate
  • parameters: no parameters
  • target: requires to specify a target control; this should be the grid whose records we want to edit. If a call of this action is mapped to a grid event, there is no need to specify the target.

gridEdit

Opens a window that allows you to edit an existing record. The form or business flow that gets opened are specified in grid settings. Usually is it mapped to an event raised by the grid (for example, onRowDblClick and thus does not require the target to be specified.

  • name: gridEdit
  • parameters: no parameters
  • target: requires to specify a target control; this should be the grid whose records we want to edit. If a call of this action is mapped to a grid event, there is no need to specify the target.

gridDelete

Deletes a record from the grid. It is usually mapped to an event raised by a button.

  • name: gridDelete
  • parameters: no parameters
  • target: requires to specify a target control; this should be the grid whose records we want to edit. If a call of this action is mapped to a grid event, there is no need to specify the target.

gridRefresh

Refreshes data in the grid. It is usually mapped to an event raised by a button.

  • name: gridRefresh
  • parameters: no parameters
  • target: requires to specify a target control; this should be the grid that we want to refresh. If a call of this action is mapped to a grid event, there is no need to specify the target.

setFilter

Sets a grid filter but does not initiate filtering. It is usually mapped to any Input whose value is used as a filter value.

  • name: setFilter
  • parameters:
    • column - name of the column to be filtered against
      • optional
      • possible values: column name (without quotes) OR a list of columns separated with , OR *. The * value indicates that the filter is applied to all grid columns simultaneously. This can be applied to like filters
      • default value: *
    • term - sets filtration method
      • optional
      • possible values: =, >, <, >=, <=, like, like*, *like. like - looks for a substring in a string. like* - is a "starts with" condition, *like - is an "ends with" condition.
      • default value: like
  • target: requires to specify the target control; it should be a grid whose records we want to filter.

applyFilter

Filters records in a grid with a filter set with the use of the setFilter action. Usually it is mapped to an event raised by a button.

  • name: applyFilter
  • parameters: no parameters
  • target: requires to specify the target control; it should be a grid whose records we want to filter.

You can take a look at an example of filtering in a grid in the FAQ.

Actions to work with forms

validate

Initiates form validation; if the form does not pass validation the action chain is stopped.

  • name: validate
  • parameters: no parameters
  • target: is not required

save

Saves the data displayed in a form.

  • name: save
  • parameters: no parameters
  • target: is not required

exit

Closes the form and redirects to /.

  • name: exit
  • parameters: no parameters
  • target: is not required

refresh

Refreshes form data pulling it from the server.

  • name: refresh
  • parameters: no parameters
  • target: is not required

Actions to work with workflow

Actions of this section can be mapped only to the Workflow Bar control

workflowExecuteCommand

Initiates a workflow command.

  • name: workflowExecuteCommand
  • parameters: no parameters
  • target: is not required

workflowSetState

Initiates setting of a new state of a workflow process.

  • name: workflowSetState
  • parameters: no parameters
  • target: is not required

Other actions

redirect

Redirects to an URL set in the target parameter.

  • name: redirect
  • parameters:
    • target
      • required
      • the value should be an URL redirected to
  • target: not required

confirm

Opens a confirmation window with two buttons: "OK" and "Cancel". When pressing "OK" the action chain execution continues. When pressing "Cancel" the action chain stops. The window heading, text, "OK" and "Cancel" buttons text can be modified with the help of parameters. This action can be built into a chain of any other actions and serves to confirm an operation.

  • name: redirect
  • parameters:
    • confirmTitle
      • optional
      • sets localization of the confirmation window heading. The value can be a constant from the msg section of the app localization file
    • confimText
      • optional
      • sets localization of the confirmation window text. The value can be a constant from the msg section of the app localization file
    • confirmOk
      • optional
      • sets localization of the "OK" button. The value can be a constant from the msg section of the app localization file
    • confirmCancel
      • optional
      • sets localization of the "Cancel" button. The value can be a constant from the msg section of the app localization file
  • target: is not required