Hello all,
I am trying to use the context menu plugin integrated in the Apex 5 treeview library or at least to select programmatically an item of the trevieew on right click. The idea is to display a contextual menu when a user right clicks on a treeview node and get back the id of the selected node into that menu.
I have read the forum threads, different interresting articles but I still cannot figure out how to do that. I have also read the code of widget.treeView.js that is not documented but it is quite difficult for me to understand how to use it.
This works well if a tree node has been previously selected. I know it is possible to define a context menu using this library, but I do not understand how and how to retrieve the id of the concerned node in that context.
I could also use another Jquery contextual menu and retrieve the id using the previous working statement, but I would like to avoid the user to right click the node before left click to render the menu. The idea was then to select the treeview node programmatically on right click.
I have seen setSelectedNodes and setSelection in the library but I do not know how to use them and what the calls should look like (how and what to pass as parameter).
Any example of doing one of theses two things or help on this would be really appreciated.
Thanks in advance.
Regards,
Mno