9 Replies Latest reply on May 22, 2008 12:34 AM by ramprasadhtv

    rich:toolTip is not displayed

    styx2000

      Hi,

      i upgraded from richfaces 3.1.3GA to 3.2GA.

      Now i have some problems with tooltips, which worked before the upgrade:

      1) tooltip on h:outputText
      This doesn't work at all anymore. The following code-snippet worked before.

       <h:outputText id="out1" value="test output" >
       <rich:toolTip id="out1_tt" value="tooltip output" showDelay="1000" styleClass="tooltip"/>
       </h:outputText>
      

      I use these a lot in my application, all the labels in my forms have tooltips.

      2) tooltip in rich:dataTable
      This worked before the upgrade and doesn't work anymore.

       <rich:column width="20" style="text-align:center;">
       <f:facet name="header">
       <h:outputText value="header" />
       </f:facet>
       <h:graphicImage id="gih1" value="/images/history_small.gif">
       <rich:toolTip>
       <rich:panel styleClass="tooltip-text">
       <h:outputText value="asdfljasdf"/> </rich:panel>
       </rich:toolTip>
       </h:graphicImage>
      </rich:column>
      


      The datatable tag is as follows:
      <rich:dataTable id="table01" value="#{bean.searchResults}"
       var="elem" width="100%" rows="20"
       rowKeyVar="row" rowClasses="row1, row2" headerClass="cu-tableheader">
      
      


      I tried the tooltip in the datatable with an image and with a command button. Both dont work.
      If i go to the second page via the rich:dataScroller both toolTips are displayed properly.
      Also when i use the new sorting feature on one of the columns the toolTips are displayed properly after sorting the first time.

      Is anybody experiencing the same problems, are these bugs or am i doing something wrong?

      Thanks for your time!

        • 1. Re: rich:toolTip is not displayed
          ilya_shaikovsky

          http://jira.jboss.com/jira/browse/RF-2817

          should not be reproducible in SR 1 release

          • 2. Re: rich:toolTip is not displayed
            styx2000

            hi,

            thanks for your reply.

            i upgraded to 3.2.0 SR1, the problem still remains.

            The JIRA comment says:


            Works in that way:

            <h:outputText id="text" value="abc">
            <rich:toolTip value="Test1111">
            </rich:toolTip>
            </h:outputText>


            I tried this exact code, but it doesn't work.

            Also, in the bug report under resolution it says "won't fix" - what does that mean?

            thanks

            • 3. Re: rich:toolTip is not displayed
              ilya_shaikovsky

              this was also reproducable for me but later becomes not reproducible. So we do nothing with this issue.

              you may upload your sample war to this bug and reopen it if reproducable under SR1

              • 4. Re: rich:toolTip is not displayed
                styx2000

                i might do that when i find some spare time.

                i did find a workaround though, the following code does work:

                <h:outputText id="text" value="abc">
                </h:outputText>
                <rich:toolTip value="Test1111" for="text">
                </rich:toolTip>
                


                (putting the tooltip on the same level as the parent and adding a "for" attribute)

                this would be an acceptable solution for my project, even though it's quite a lot of work.

                What worries me more is the issue with the tooltip in the table - do you think this will be fixed in the near future? Or is nobody else experiencing this problem?


                • 5. Re: rich:toolTip is not displayed
                  ilya_shaikovsky

                  When I'm suffering this issue (with table) I've solved it on demosite by using outputPanel as fist child of the column and all the content inside.

                  • 6. Re: rich:toolTip is not displayed
                    ilya_shaikovsky

                    you may look at our demo online

                    • 7. Re: rich:toolTip is not displayed
                      styx2000

                      your solution with the outputPanel (as seen in the online demo) works.

                      maybe somebody should put this information in the migration issues document.

                      • 8. Re: rich:toolTip is not displayed

                        I verified in my demo application. Tooltip did not work with 3.2.0SR1, works with 3.2.1 20080521 build.

                        -jason

                        • 9. Re: rich:toolTip is not displayed

                          We can try like this and it should work. Else wrap it inside a output panel
                          <a:jsfGraphicImage id="toolTipPasswordExp" value="#{image['HelpIcon']}"/>
                          <a:richHelpToolTip followMouse="true" direction="top-right" delay="100"
                          for="toolTipPasswordExp">
                          .... text </a:richHelpToolTip>

                          Note: For the tool tip inside the data table, we need to wrap it within a rich panel or OutputPanel as mentioned in the thread.
                          BUT, If we use Output panel it works in IE but doesnt work in Opera inside a data table. If we use rich panel instead of Output panel, then it works both in IE and Opera. But the the point is that the rich panel will occupy some width and height that might result in UI alignment problems.