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 Function.

request

Depending on the function, this attribute is used to specify a parameter object that contains further data.

sourceId

Freely selectable ID. This is used when transmitting the Function result transmitted as destinationId. This allows the caller to uniquely assign the result.

Function result

The result of the function call Function call is transmitted asynchronously to the embedding page via Window.postMessage.

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

Reads the form configuration including the current status (admin/formconfig.adoc#state).

setData

Sets the data in the status object.

validateData

Triggers Validation.

submitData

Triggers Submit - Form submission

resetForm

Triggering of Reset - Reset the input

printForm

Triggering of Print - printout of the form in a pdf


Keywords: