2 Replies Latest reply on May 13, 2013 3:44 AM by smoking81

    Open rich:popupPanel on current mouse cursor position using jquery

    smoking81 Newbie

      Hello everybody! I use RF 4.2.0.Final and have the following code which will open a rich:popupPanel vertically aligned with (and directly below) the h:commandButton:

      <h:commandButton value="Open popup" id="openBtn">
      <rich:componentControl event="click" target="myPopup" operation="show">
      <a4j:param name="event" value="event" noEscape="true" />
      <rich:hashParam>
      <a4j:param noEscape="true" name="top" value="jQuery(#{rich:element('openBtn')}.parentNode).offset().top  + jQuery(#{rich:element('openBtn')}.parentNode).height()" />
      <a4j:param noEscape="true" name="left" value="jQuery(#{rich:element('openBtn')}.parentNode).offset().left" />
      </rich:hashParam>
      </rich:componentControl>
      </h:commandButton>
      <rich:popupPanel id="myPopup" modal="false" autosized="true" resizeable="false" ....

       

      Now, I'd like to let the mouse cursor become the upper left corner of the popup, but I couldn't find out how to do this (unfortunately I don't have any practice with jquery). Can you please help me?

       

      Thanks