2

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??

Jeremy Hodge
  • 1,655
  • 9
  • 8
D.Bugger
  • 2,300
  • 15
  • 19

2 Answers2

5

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.

Paul Stephen Withers
  • 15,699
  • 1
  • 15
  • 33
  • Have neither book nor demo db. Correction: I have the demo db somewhere, but I was too lazy to go on a fishing expedition in the demo db... *sigh* I'll get my tackle... – D.Bugger May 22 '12 at 16:55
  • 1
    Here's a link to the demo in OpenNTF hosted version of the Extension Library database: http://208.85.190.65/demos/demoextlib.nsf/Core_Outline.xsp – Per Henrik Lausten May 22 '12 at 17:58
  • Ok, and now for the Right-click popup menu... ;-) – D.Bugger May 26 '12 at 22:28
0
    <xp:eventHandler event="contextmenu" submit="false">
    <xp:this.script><![CDATA[XSP.openMenu(thisEvent,#{javascript:getComponent('pop1').getMenuCtor()})
    ]]></xp:this.script>
    </xp:eventHandler>
Thomas Adrian
  • 3,543
  • 6
  • 32
  • 62