5 Replies Latest reply on Aug 11, 2008 2:31 PM by aish

    Will tooltip work within scrollableDataTable

    aish

      Hi,

      Can you please let me know if tooltip will work with ScrollableDataTable? It works with DataTable and I tried the same implementation for scrollabledatatable and it is not working. Given below is the code that I tried and please let me know what I should be doing differently for scrollabledatatable to get this tooltip to be working?


      I see a tiny square when I scrollover the mouse in a ScrollableDataTable where as the same code when included with regular dataTable works fine.

      Thanks
      Aish

      (To make it simple, I am including only the portion of the ScrollableDataTable column where the tooltip is included.


      <rich:column>
      <f:facet name="header">
      <h:outputText value="Errored Headers" /></f:facet>

      <a4j:outputPanel layout="block">
      <rich:toolTip direction="top-right" followMouse="true" mode="ajax"
      styleClass="tooltip" layout="block">
      <h:panelGrid columns="1" style="width:300px;height:100px">
      <h:outputText value="#{sumdetail.errored_headers}" />
      </h:panelGrid>
      </rich:toolTip>
      <h:outputText value="#{sumdetail.errored_headers}" />
      </a4j:outputPanel>


      </rich:column>

        • 1. Re: Will tooltip work within scrollableDataTable
          markrich

          Hi Aish,

          I encountered the same question in last night. and I did finally.

          you can try to put the <rich:tooltip> out of the scrollable datatable and pointing the for attribute to the target. for example:

          <rich:toolTip direction="top-right" followMouse="true" mode="ajax"
          styleClass="tooltip" layout="block" for="tooltip">
          <h:panelGrid columns="1" style="width:300px;height:100px">
          <h:outputText value="#{sumdetail.errored_headers}" />
          </h:panelGrid>
          </rich:toolTip>

          <rich:scrollableDataTable>
          ...
          <rich:column>
          <f:facet name="header">
          <h:outputText value="Errored Headers" /></f:facet>

          <a4j:outputPanel layout="block" id="tooltip">

          <h:outputText value="#{sumdetail.errored_headers}" />
          </a4j:outputPanel>

          </rich:column>
          ...
          </rich:scrollableDataTable>

          • 2. Re: Will tooltip work within scrollableDataTable
            aish

            Hi Mark,

            Thanks for your response.

            I tried the code that you have provided. The get the following error message:

            This attribute is not recognized.
            styleClass="tooltip" layout="block" for="tooltip">
            ^-^

            at weblogic.servlet.jsp.JavelinxJSPStub.compilePage(JavelinxJSPStub.java:292)
            at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:200)
            at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:164)
            at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:235)
            at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:391)
            Truncated. see log file for complete stacktrace

            • 3. Re: Will tooltip work within scrollableDataTable
              aish

              Hi Mark,


              Here is an update on my previous response:

              There was an error thrown out (message was given in my previous post) for the "for" attribute. So, I removed the "for" attribute and I tried it again. A tool tip box appears but the tool tip is blank. The value ="#{sumdetail.errored_headers}" /> is not displayed in the tool tip. This could be due to the removal of the "for" attribute.

              Can you please suggest why it is reporting "for" attribute.. I added exactly the same ay as you have given

              Thanks
              Aish



              • 4. Re: Will tooltip work within scrollableDataTable

                Good afternoon,

                I believe that if you embedded it in a parent object that the for attribute is not required. We also use a tooltip in a SDT and here is an example of code that works for us.

                <rich:column width="24px" style="sdt-column-details" cellStyle="overflow:visible;z-index:100;">
                 <a4j:commandButton id="details" action="#{action.viewDetails}" reRender="detailsMP" onclick="Richfaces.showModalPanel('detailsMP');">
                 <rich:toolTip direction="bottom-left" zorder="200" followMouse="true" layout="block" >
                 <h:outputText styleClass="output-text-label-right" value="#{msgs['table.details.tooltip']}" />
                 </rich:toolTip>
                 <a4j:actionparam name="id" value="#{object.id}" assignTo="#{action.id}"/>
                 </a4j:commandButton>
                </rich:column>
                


                Cheers.

                Whatty

                • 5. Re: Will tooltip work within scrollableDataTable
                  aish

                  hi Steven,

                  Thanks for responding. I tried the tooltip based on your suggestion as given below and It does not show any tooltip. Can you please let me know what I am missing.

                  Thanks
                  Aish

                  <rich:column width="325px">
                  <f:facet name="header">
                  <h:outputText value="Err_Stack_Trace" id="ErrorTable_oText22"/>
                  </f:facet>
                  <rich:toolTip direction="bottom-left" followMouse="true" layout="block" >
                  <h:outputText value="#{errdetail.err_stack_trace}" />
                  </rich:toolTip>

                  <h:outputText value="#{errdetail.err_stack_trace}" id="ErrorTable_oText23" />
                  </rich:column>