2 Replies Latest reply on Dec 6, 2008 3:50 PM by nimo stephan

    rich:tooltip - do not move

    nimo stephan Master

      Hello,

      I use the rich:tooltip:

      <rich:toolTip for="myLink" direction="bottom-left" showEvent="onclick" hideEvent="onsubmit" verticalOffset="8">


      the tooltip appears when I click a link
      and disappears when I click the submit button (within the tooltip). That works.

      But when I click the mouse within the tooltip (onmouseclick?),
      then the tooltip moves a little bit away.

      I do not want that. How can I avoid that?



        • 1. Re: rich:tooltip - do not move
          nimo stephan Master

          With this:

          <rich:toolTip for="myLink" direction="bottom-left" showEvent="onclick" hideEvent="onsubmit" verticalOffset="8">

          the hideEvent with onsubmit calls the showEvent indirectly, because the onsubmit can only be called by a onclick-event.

          For example: I have a "close"-button inside my tooltip:

          <rich:toolTip id="myToolTip" showEvent="onclick">

          <a4j:commandLink id="close" value="close ToolTip" reRender="..">
          <rich:componentControl for="myToolTip" attachTo="close" operation="hide,disable" event="onclick"/>
          </a4j:commandLink>
          </rich:toolTip>

          When I click the commandLink inside the toolTip,
          then a onclick-event occurs because of my onsubmit-event and the tooltip is shown again (showEvent=onclick). My tooltip vanishes AFTER the showEvent. How can I avoid this?

          • 2. Re: rich:tooltip - do not move
            nimo stephan Master

            Okay, I guess, I need something like:

            <rich:toolTip .. onshow="if not hide then show" disable" showEvent="onclick" hideEvent="onclick">


            If the hideEvent (which is triggered also by onclick) is called,
            then the onshow-function should proof,
            if the hideEvent was triggered, if so, then do not show the tooltip.


            But I dont know, what should I insert into onshow?