0 Replies Latest reply on Nov 2, 2011 4:26 AM by Markus Dahm

    Howto add tooltip to rows of rich:dataTable

    Markus Dahm Novice

      Hi,

       

      is it possible to add a tooltip to an entire row of a rich:dataTable?

      I think this a very common use case, but we could not get it to work as expected. What we currently use

      is a tooltip per table cell. This works, but is drastically increases the amount of transferred data: If the table

      has 15 rows and 11 columns this results in 165 tooltips...

       

      The code looks like this:

       

       

      <rich:dataTable id="artikelListTable" rowClasses="oddRow, evenRow"  rows="15" value="#{artikelListeController.artikelListe}"
                  var="artikel">
                   <rich:column id="laufendeNummer" sortBy="#{artikel.laufendeNummer}">
                      <f:facet name="header">
                          <h:outputText
                              value="#{messages['devA.articlelist.laufendeNummer']}" />
                      </f:facet>
      
                      <h:outputText value="#{artikel.laufendeNummer}">
                           <f:convertNumber pattern="00000" />
                       </h:outputText>
      
                      <ui:include src="/WEB-INF/pages/articlelist/article_tooltip.xhtml" />
                  </rich:column>
      
                  <rich:column id="status" headerClass="statusColumn">
                      <f:facet name="header" >
                          <h:outputText value="#{messages['devA.articlelist.status']}" style="left: 25%; position: relative;"/>
                      </f:facet>
      
                      <div align="center">
                          <h:graphicImage styleClass="statusImage"
                              value="../../resources/images/ampel/#{artikel.ampelStatus.name}.png"/>
                      </div>
      
                      <ui:include src="/WEB-INF/pages/articlelist/article_tooltip.xhtml" />
                  </rich:column>
                ........
                <f:facet name="footer">
                      <rich:dataScroller for="artikelListTable" fastControls="hide" />
                  </f:facet>
              </rich:dataTable>
      

                   

      Any ideas?

       

      Thanks in advance

         Markus