!--a11y-->
Application Example for Displaying
Messages 
To demonstrate the error behavior and the display of messages within a Web Dynpro application, it is sufficient to have a simple form with three input fields for Name, Birthday, and E-Mail Address. The field Name is marked as mandatory. The following graphic demonstrates this in the application scenario to be developed.

Using the Send E-Mail pushbutton, the user can navigate to a second view in which an e-mail message can be edited and sent. This navigation link should only be followed up by the Web Dynpro runtime environment if the input field for the e-mail address contains an entry. If this is not the case, a corresponding error message is displayed in the form of a link; when the link is generated, it focuses directly on the corresponding error source – in this case, the input field for the e-mail address.


The e-mail address entered previously should be contained in the title of the view for editing the e-mail text. Above a navigation link to the input form, you will find the pushbutton Send E-Mail; use this button to send the e-mail message.

After you have pressed the button Send E-Mail, the system displays a message, in the Form View, that the e-mail message has been sent successfully.

Storing the sample form should involve different input checks, and the results of the checks should be displayed to the user through appropriate message texts. The messages are directly linked with the corresponding UI input elements so that the user can navigate to the appropriate UI element quite easily. The UI elements linked to the error message are also highlighted in color.

Entering a name for the user is required. This is marked by an asterisk at the label in front of the name field.
The input check should also point the user to the entry of a birthday date in the future.

If the e-mail address is missing, an appropriate warning message is displayed.

If the input check is successful after you have pressed the Save button, the system issues an appropriate message.

By pressing the button Clear Errors, the user can then return to the initial status of the application example, if error messages to be processed are displayed. In this case, the input check is suppressed.
Now start with the declarative program
development, which needs to be converted to create the sample application
described here.
For more information on the APIs used for error handling as well as their methods, refer to the section Error Handling.
