Embedded mode (iFrame)
The renderer can be embedded in other applications via an iFrame and controlled via it.
Function call
A serialized JSON object is transmitted as message Parameters.
requestName-
Name of the function to be called.
request-
Depending on the function, this attribute is used to specify a parameter object that contains further data.
sourceId-
Freely selectable ID. This is transmitted as
destinationIdwhen the function result is transmitted. This allows the caller to uniquely assign the result.
Function result
The result of the function call is transmitted asynchronously via Window.postMessage to the embedding page.
{
"requestName": "METHOD_NAME",
"request": {
"_comment": "optional request object"
}
}
{
"requestName" : "METHOD_NAME",
"destinationId" : "SAME_AS_SOURCE_ID",
"response" : {
"_comment": "optional response object"
}
}
Functions
The following functions are available.
- setFormConfig
-
Set the form configuration.
- getFormConfig
-
Read the form configuration including the current status (admin/formconfig.adoc#state).
- setData
-
Set the data in the status object.
- validateData
-
Trigger Validation.
- submitData
-
Trigger Submit - form submission
- resetForm
-
Trigger Reset - Reset the input
- printForm
-
Trigger Print - Print the form to a pdf