0 Replies Latest reply on Aug 14, 2008 8:03 AM by Christoph Schoenfeld

    Tooltip does not work within repeated components

    Christoph Schoenfeld Newbie

      Dear RichFaces users and developers,

      please consider the following Facelets tag file:

      decorator.xhtml:

      <ui:component xmlns="http://www.w3.org/1999/xhtml" ... >
       <h:graphicImage url="/images/icons/info.png">
       <rich:toolTip>...</rich:toolTip>
       </h:graphicImage>
       <ui:insert/>
      </ui:component>


      It applies the decoration pattern to the caller's body. The given body is prepended with a graphicImage on which there is a tooltip. An example use reads like this:

      mypage.xhtml:
      <my:decorator>
       <h:inputText value="model.property1">
      </my:decorator>
      <my:decorator>
       <h:inputText value="model.property2">
      </my:decorator>
      <my:decorator>
       <h:inputText value="model.property3">
      </my:decorator>


      I expect individual tooltips for each invocation of my:decorator.

      In fact, I find that tooltip code is generated in the HTML output but no tooltip appears when the mouse is moved over the image.

      A forum post or JIRA issue claims that one should use the same value for the "id" attribute of the graphicImage and the "for" attribute of the rich:tooltip. This ends up in all three tooltips having the same ID and popping up at the image generated by the first decorator call.

      Any ideas are greatly appreciated.

      My setup: RichFaces 3.2.1, Tomcat 6.0.14, Java Facelets 1.1.14, Spring WebFlow 2.0.2