Embedded mode (iFrame)

The renderer can be embedded in other applications via an iFrame and controlled via it.

Window is used for communication with the renderer in the iFramehttps://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage[.postMessage] is used. All Functions also send responses in this way to the application that embeds the renderer via iFrame.

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 destinationId when 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.

Function call structure
{
  "requestName": "METHOD_NAME",
  "request": {
    "_comment": "optional request object"
  }
}
Function result structure
{
    "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


Keywords: