MessageArea Events
● onNavigate
Event for the navigation.
This event is supported if the WDLIGHTSPEED application parameter is active.
For reporting the message with the Web Dynpro Message Manager, the ENABLE_MESSAGE_NAVIGATION parameter must be set to X. Only then is the message displayed as a link.
The methods of the Message Manager for reporting a message have a 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 parmeter of the onNavigate event. This ID can be used when calling the IF_WD_MESSAGE_MANAGER~GET_MESSAGE_FOR_ID method, which returns all information on the message.
You can use the following call to access the message and all its data (including 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 in Test onNavigate Action of MessageArea.
Parameter name |
Type |
Description |
ID |
STRING |
|
CONTEXT_ELEMENT |
IF_WD_CONTEXT_ELEMENT |
|
MESSAGE_ID |
STRING |
Message ID |