Contains custom functions which can be used in the rule editor.
Members
-
<static> toObject
-
Converts a JSON string to an object.
-
<static> validateURL
-
Validates if the given URL is correct.
-
<static> defaultErrorHandler
-
Default error handler for the invoke service API.
-
<static> defaultSubmitSuccessHandler
-
Handles the success response after a form submission.
-
<static> defaultSubmitErrorHandler
-
Handles the error response after a form submission.
-
<async, static> fetchCaptchaToken
-
Fetches the captcha token for the form.
This function uses the Google reCAPTCHA Enterprise service to fetch the captcha token.
-
<static> dateToDaysSinceEpoch
-
Converts a date to the number of days since the Unix epoch (1970-01-01).
If the input date is a number, it is assumed to represent the number of days since the epoch, including both integer and decimal parts. In this case, only the integer part is returned as the number of days.
Methods
-
<static> externalize(url)
-
Prefixes the URL with the context path.
Parameters:
Name Type Description url
string The URL to externalize.
Returns:
- The externalized URL.
- Type
- string
-
<static> navigateTo(destinationURL, destinationType)
-
Navigates to the specified URL.
Parameters:
Name Type Description destinationURL
string The URL to navigate to. If not specified, a new blank window will be opened.
destinationType
string The type of destination. Supports the following values: "_newwindow", "_blank", "_parent", "_self", "_top", or the name of the window.
Returns:
- The newly opened window.
- Type
- Window