Live Data async actions

Last modified by Manuel Leduc on 2024/03/18 10:20

It is now possible to allow a Live Data actions to be asynchronous. Instead of following the link, the action will be performed in the background, and the Live Data refreshed at the end of the process.
Additionally, it is possible to define a user confirmation before performing the action.

Example:

{{liveData
  id="test"
  properties="name,_actions"
  source="liveTable"  sourceParameters="className=Space.MyClass"
}}{
  "meta": {
    "actions": [{
        "id": "delete",
        "async": {
          "httpMethod": "POST",
          "loadingMessage": "Loading",
          "successMessage": "Delete Success",
          "failureMessage": "Failed",
          "body": "newBacklinkTarget=&updateLinks=false&autoRedirect=false&form_token=${services.csrf.token}&confirm=1&async=true",
          "headers": {
            "Content-Type": "application/x-www-form-urlencoded"
          }
        }
      }]
  }
}
{{/liveData}}

Get Connected