Sorry for my english.
I'm trying to implement a contextMenu (rigth-click), on Tree nodes.
I see the property "oncontextmenu", but I find a bit problem.
With other onXXX (onClick, onMouseDown), I can do:
onClick(myFunction(event)).......
function myFunction(e){
// e is a Event object
}
I need get, the Event object because, I would like to do, something like this:
<rich:treeNode type="organism" oncontextmenu="showFileContextMenu(event); return false;"> ............ </rich:treeNode>
function showFileContextMenu(e){ var left = Event.pointerX(e)+'px'; var top = Event.pointerY(e)+'px'; var element = $('menu'); // div with the UI menu element.setStyle({left: left, top: top, position: 'absolute'}); $('menu').show(); //Event.stop(e); }