I've a context menu (IMAGE_MENU) with two menu actions. I'm dynamically adding images to my view:
data(image) = cl_wd_image=>new_image(
id = 'UNIQUE_ID'
source = '~Icon/Cancel'
context_menu_id = 'IMAGE_MENU'
context_menu_behaviour = cl_wd_image=>e_context_menu_behaviour-provide ).
data(flow_data) = cl_wd_flow_data=>new_flow_data( element = image ).
i_container->add_child( image ).
All works fine. When I right click on the image, I see my context menu. The problem is that when I chose a menu option, the action triggers, but WDEVENT doesn't tell me the context element.
WDEVENT->PARAMETERS has the value of the selected menu option, but CONTEXT_ELEMENT points to null.
WDEVENT->SOURCE_COMPONENT_ID (which is what I expected to have the value of my image_info-name) is blank.
Any ideas?