3 Replies Latest reply on Jan 5, 2008 3:55 PM by aragorn

    Hiding tooltip text with componentControl

    aragorn

      I've got a richfaces tooltip attached to an inputText box. I'd like the tooltip text to disappear once the user clicks in the input box or starts typing into it.
      I thought I could do this with the componentControl as in the code below, but this isn't working (no errors, but the text isn't hiding).

      I know I can hide it after a timed delay, but I'd like to do it this way if possible. The tooltip shouldn't be permanently disabled, ie if the user hovers over the inputbox again later the tooltip should reappear.

      Can anyone advise me how to achieve this please?
      Cheers.

      <h:inputText id="txtorg" value="#{searchParamVO.company}" >
      <rich:toolTip id="tt" followMouse="false" direction="top-right" mode="ajax"
      value="#{searchParamVO.companyHelp}"
      layout="block" styleClass="popupBox" showDelay="2000">
      </rich:toolTip>
      <rich:componentControl attachTo="txtorg" disableDefault="true" for="tt" event="onclick"
      operation="Hide" />
      </h:inputText>