This content has been marked as final.
Show 1 reply
-
1. Re: tree w/context menu
nbelaevski Sep 5, 2008 2:40 PM (in response to gholmer)Hi,
Here is the possible variant:function setSelection(e) { var elt = Event.element(e); while (elt && !elt.object) { elt = elt.parentNode; } elt.object.toggleSelection(e); Event.stop(e); }
<rich:tree id="swingTree" switchType="client" value="#{bean.swingTreeNodes}" var="data" preserveModel="none"> <rich:treeNode oncontextmenu="setSelection(event);"> <h:outputText value="#{data.data}" /> </rich:treeNode> </rich:tree>