on 07-15-2014 3:41 PM
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?
Hi Matthew,
The parameter 'CONTEXT_ELEMENT' of a menu action will be filled when we use the menu inside a table/ on table cell.
To get the details of view element on which the menu is called, use the parameter CONTEXT_MENU_EVENT of method 'WDDOONCONTEXTMENU'.
The method 'WDDOONCONTEXTMENU' is called as soon as we right click for menu.
Hope this helps you.
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.