cancel
Showing results for 
Search instead for 
Did you mean: 

Context Menu on Tree Element

Former Member
0 Kudos

I have a tree element to which I've assigned a context menu to the tree's element. The problem is that when I right click a tree element, it does not get selected. So my users have to first left-click the element, then right-click to get the appropriate popup menu. I have no other way of knowing which tree element was right clicked.

Is there a way to have a right click select the tree node before presenting the context menu?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I assume you are still on Web Dynpro version 7.0, right? In all versions <= 7.0 there don't exist (real) context menus yet. These have first been introduced (together with a programming model) in version 7.1.

In versions <= 7.0 you can however assign a menu to the TreeNodeType or TreeItemType UI element. You can also use event parameter mapping to determine the context node element representing the tree node where a menu entry has been selected. But there is no hook or event handler for the opening of the menu itself.

To determine the tree node where a menu entry has been selected, you can map the (implicit) event parameter named "nodeElement" to an action parameter of type IWDNodeElement or I<Nodename>Element. No need to set the tree selection to this context element!

Armin

Answers (0)