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
Key | Type | Description | Default Value |
---|---|---|---|
"params" (required) | Object | undefined | null |
Parameters
Key | Type | Description | Default Value |
---|---|---|---|
"async" | Boolean,String | Specifies whether to wait for the download to complete. | true |
"onError" | String | Event that is fired in case of an error. | null |
"onErrorType" | OnErrorType | Type of event that will be fired on error. | null |
"onSuccess" (required) | String | Event that is fired in case of success. | null |
"onSuccessType" | OnSuccessType | Type of event that will be fired on success. | null |
"type" (required) | String | The type of data to be preloaded. | null |
"urls" (required) | Array | List of URLs of the data. | null |
Inherited
From Base Action
Base Action
Field Configurations
Key | Type | Description | Default Value |
---|---|---|---|
"dynamicParams" | Object | Dynamic params to retrieve data from a specific context e.g. a userSetting. | null |
"leadingDelimiter" | String | The leading mustache delimiter to use. | null |
"params" | Object,Array | Object containing the properties of the action. | null |
"trailingDelimiter" | String | The trailing mustache delimiter to use. | null |
"type" | String | Type 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.