Skip to main content

preLoad

Load data to be accessed without a data connection. The data can be general files like PDFs, web content or complete nodes of a configuration.

Field Configurations

KeyTypeDescriptionDefault Value
"params" (required)Objectundefinednull

Parameters

KeyTypeDescriptionDefault Value
"async"Boolean,StringSpecifies whether to wait for the download to complete.true
"onError"StringEvent that is fired in case of an error.null
"onErrorType"OnErrorTypeType of event that will be fired on error.null
"onSuccess" (required)StringEvent that is fired in case of success.null
"onSuccessType"OnSuccessTypeType of event that will be fired on success.null
"type" (required)StringThe type of data to be preloaded.null
"urls" (required)ArrayList of URLs of the data.null

Inherited

From Base Action

Base Action

Field Configurations

KeyTypeDescriptionDefault Value
"dynamicParams"ObjectDynamic params to retrieve data from a specific context e.g. a userSetting.null
"leadingDelimiter"StringThe leading mustache delimiter to use.null
"params"Object,ArrayObject containing the properties of the action.null
"trailingDelimiter"StringThe trailing mustache delimiter to use.null
"type"StringType name of the action.null

Examples

Example 1: Preload data

Goal: Creat a preLoad action loading a PDF file.

To achieve this the following code can be used:

{
"type": "preLoad",
"params": {
"type": "pdf",
"urls": [
"https://fabrik19.de/wp-content/uploads/2021/07/Produktkatalog-Fabrik19-eGovernment.pdf"
],
"async": true,
"onSuccess": "preloadSuccess",
"onError": "preloadError"
}
}

The urls parameter specifies the path to the data to be preloaded.

Result:

A preLoad action has been created.