MessageArea Events
Use
Events in View Designer
-
onNavigate
Event for the navigation.
For reporting the message with the Web Dynpro Message Manager, the ENABLE_MESSAGE_NAVIGATION parameter must be set to the value X. Only then is the message displayed as a link.
The methods of the Message Manager for reporting a message have the USER_DATA parameter. This parameter can be used to give the message additional information that can be analyzed in the action handler of the onNavigate event. To enable this, the ID of the message for which the event was triggered is passed in the MESSAGE_ID parameter of the onNavigate event. This ID can be used to call the method IF_WD_MESSAGE_MANAGER~GET_MESSAGE_FOR_ID, which returns all of the information for the message.
You can use the following call to access the message and all of its data (also User_data, and so on) in the event handler:
data l_message type if_wd_message_manager=>ty_s_message.
l_message = wd_this->message_manager->get_message_for_id( message_id ).
You can find an example in the system in the WDR_TEST_MSG_AREA component under Test OnNavigate Action of MessageArea.
Parameter Name
Type
Description
ID
STRING
CONTEXT_ELEMENT
IF_WD_CONTEXT_ELEMENT
MESSAGE_ID
STRING
Message ID
More Information
For more information about the classes and interfaces, see the relevant objects in the system.