Search code examples
tooltipxpages

How to run this command SSJS


tooltipScreenShot XSP.openTooltipDialog("#{id:tooltipDialog1}",'#{id:button1}')

How does it work on SSJS? If a function returns false, this tooltip dialog has to appear next to the button. I believe this tooltip should be close to the button. It appears bottom left corner

All these commands below don't work:

facesContext.getViewRoot().postScript("XSP.openTooltipDialog('#{id:tooltipDialog1}')");

facesContext.getViewRoot().postScript("XSP.openTooltipDialog('#{id:tooltipDialog1}','#{id:button20}')");

view.postScript("XSP.openTooltipDialog('#{id:tooltipDialog1}');");

Solution

  • Use getComponent("tooltipDialog1").show(). The syntax for opening tooltip dialogs in SSJS is the same as for normal dialogs, see XPages Extension Library pp156-162.

    setFor() is available via SSJS only.

    enter image description here