5 Replies Latest reply on Feb 11, 2009 4:12 AM by srihari Prabaharan

    the richfaces tooltip example does not work........

    Kevin Taylor Newbie

      I am horribly frustrated. To be honest, I come from a .net background and I decided to add java to my repertoire because it appeared to have really good web 2.0 development tools, but I keep running into one brick wall after another. It is starting to feel like going to a restaurant and having a plate of well decorated food sat before you, only to dig in and realize that it begins and ends at looks. Everytime I fix one thing it seems like something else is lurking in the shadows. Now that I have vented, sob story aside. Me and the tooltip are really not getting along. I tried to take from the examples and they dont seem to be getting me anywhere. I even tried to replace my code with the following code from the documentation:

      <h:commandLink value="Simple Link" id="link">
       <rich:toolTip followMouse="true" direction="top-right" mode="ajax" value="#{bean.toolTipContent}" horizontalOffset="5"
       verticalOffset="5" layout="block">
       <f:facet name="defaultContent">
       <f:verbatim>DEFAULT TOOLTIP CONTENT</f:verbatim>
       </f:facet>
       </rich:toolTip>
      </h:commandLink>
      I tried to replace the bean.toolTipContent with something from my bean, I also tried to replace everything between the value quotes with "testing 1 2 3" and this did not work either. I every case, it never stopped displaying the defaultContent. What could I be missing? Am I interpreting the documentation wrong? Is there something extra I need to add that the documentation is not providing? Could it be a configuration problem? Could someone provide me with some clear cut examples of how this should work?

        • 1. Re: the richfaces tooltip example does not work........
          Ilya Shaikovsky Master

          #{bean.toolTipContent} - should be the string to be inserted to tooltip.
          Or you coulf just insert some content nested to you tooltip and it will be used as tooltip content.

          Please check that the tooltip is placed inside the form because it sends ajax reqeust to get it content with mode="ajax"

          • 2. Re: the richfaces tooltip example does not work........
            Kevin Taylor Newbie

            Should it make a difference whether or not the tooltip is contained within a dataTable? I added the same code outside of my dataTable and it works. The one I have inside the dataTable seems to not work. It never goes away from the defaultContent. Every outer container has an id value set. The dataTable is container within a h:form tag.

            • 3. Re: the richfaces tooltip example does not work........
              Ilya Shaikovsky Master

              please show your page. Also you could visit richfaces-demo online. There is tooltip in dataTAble sample and tooltip works fine within the table.

              • 4. Re: the richfaces tooltip example does not work........
                Kevin Taylor Newbie

                I took my code out temporarily and added the following, which does not work either, also I have looked at the docs pretty hard but I cant get the dataTable example to work using ajax. When I think ajax, I think it should actually load the tooltip when an item is moused over, for example. Am I looking at this wrong? Is it really loading as the dataTable is rendered? What am I missing?

                <h:panelGroup id="divBrowseContainer" styleClass="gridContainer">
                 <h:panelGroup id="innerContainer" styleClass="innerContainer">
                <h:dataTable id="tstDataTable" value="#{browseBean.ist}" var="object">
                 <h:column id="colObjectNumber">
                 <f:facet name="header">
                 <h:outputText id="objectNumber"></h:outputText>
                 </f:facet>
                 <h:outputText id="txtObjectNumber" value="#{object.objectNumber}">
                 <rich:toolTip id="costInformation" direction="top-right" mode="ajax" styleClass="tooltip" layout="block" horizontalOffset="5" verticalOffset="5">
                 <h:outputText value="text goes here">
                 <rich:toolTip followMouse="true" direction="top-right" mode="ajax" value="whatthe" horizontalOffset="5" verticalOffset="5" layout="block">
                 <f:facet name="defaultContent">
                 <f:verbatim>DEFAULT TOOLTIP CONTENT</f:verbatim>
                 </f:facet>
                 </rich:toolTip>
                 </h:outputText>
                 </rich:toolTip>
                 </h:outputText>
                 </h:column>
                 </h:dataTable></h:panelGroup></h:panelGroup>