Messages
Messages can be displayed within a web application that is created with X4 Web Apps. Message
and Error
elements can be used for this in the XML file that contains the response. These messages are displayed as dialog box at the corresponding position.
The XML file that contains the message must be provided by a Technical Process. This Technical Process can be called with a custom action, for example.
<?xml version="1.0" encoding="UTF-8"?>
<Ok>
<Message>This is a sample message.</Message>
</Ok>
Messages can be localized by entering a language key as content of the message:
<?xml version="1.0" encoding="UTF-8"?>
<Ok>
<Message>$translationKey</Message>
</Ok>
With the optional attribute title, a title can be assigned to the dialog box that is displayed in the web application:
<?xml version="1.0" encoding="UTF-8"?>
<Ok>
<Message title="Custom title">This is a simple message.</Message>
</Ok>
If the <Error>
element is used instead of the <Ok>
element, the message is output as an error message. For error messages, the title "Error" or the corresponding translation is displayed as the title. No user-defined title can be assigned for error messages.
<?xml version="1.0" encoding="UTF-8"?>
<Error>
<Message>This is a sample error.</Message>
</Error>