Reputation: 2359
I'd like to have a right-click popup menu in an XPage. I therefore created a popup menu in XPages using the Extension Library. The menu doesn't display, whatever I try. Do I have to bind it to a button or so? If so, how??
Upvotes: 2
Views: 1079
Reputation: 3636
<xp:eventHandler event="contextmenu" submit="false">
<xp:this.script><![CDATA[XSP.openMenu(thisEvent,#{javascript:getComponent('pop1').getMenuCtor()})
]]></xp:this.script>
</xp:eventHandler>
Upvotes: 0
Reputation: 15739
Yes, it needs to be bound to a link or a button. The button or link needs to use Client-Side JavaScript to call the xe:popupMenu. There is an example in the Extension Library demo database, or more information in the XPages Extension Library book, chapter 8, p252.
Upvotes: 5