0 Replies Latest reply on Jul 29, 2008 10:46 AM by Anthony Ogier

    rich:tooltip inside a rich:dataTable : How to pass arguments ?

    Anthony Ogier Newbie

      Hi all,

      I've got a dataTable iterating over products, and I want the user to click on an eye button which would render a toolTip to retrieve more information about that product. Here is the code :

        <rich:dataTable var="product" value="#{productService.findForParam(param)}" rows="10">
            <f:facet name="header">#{messages.bean_label}</f:facet>
            <h:outputText value="#{product.label}" />
              <h:graphicImage url="/img/eye.gif"/>
              <rich:toolTip mode="ajax" showEvent="onclick">
                <f:facet name="defaultContent">
                  <h:graphicImage value="/img/progress.gif"/>
                  <h:outputText value="#{product.label} - #{product.price}"/>

      The problem is that when clicking on the eye image, calling the AJAX render of the toolTip, that always contains the first product of my dataTable, and not the one I've clicked.

      I've seen on Exalead demo of ToolTip that there is a special treatment for dataTables, but that code is realy unclear (I don't understand what's the point of setting the current row to a backing bean with an a4j:actionparam, because the variable used in the panel is the dataTable one ...)

      Can someone give me a hint for my issue ?