3 Replies Latest reply on Feb 29, 2008 4:23 AM by Ilya Shaikovsky

    Changed from rich:dataTable to rich:scrollableDataTable and

    Tom ONeill Newbie

      I was hoping that I could switch from data table to scrollable data table with little effort. Except for the tooltips not rendering, that was the case. Before I get carried away trying to get this to work, I just want to make sure that tooltips are useable in scrollable data tables. Can anyone confirm that you can use tooltips on a cell in a row of a scrollable data table?

      FWIW, I include a snippet of the original and new below. The only change I made was to change dataTable to scrollableDataTable.

      Thanks,
      Tom

      Original:

      <rich:dataTable id="movementHistoryTable"
      value="#{movementHistoryBB.movements}"
      var="movementBE"
      height="530px"
      width="750px"
      cellpadding="3"
      border="1"
      rendered="#{movementHistoryBB.dataLoaded}">
      <rich:column width="155px">
      <f:facet name="header">
      <h:outputText value="Horse"/>
      </f:facet>
      <h:outputText value="#{movementBE.horseName}"/>
      <rich:toolTip direction="top-right"
      mode="client"
      delay="0"
      styleClass="tooltip"
      immediate="true"
      layout="block">
      <h:panelGrid columns="2">
      <h:outputText value="Note:" />
      <h:outputText value="#{movementBE.infiniteNote}" styleClass="tooltipData" />
      </h:panelGrid>
      </rich:toolTip>
      </rich:column>




      new:

      <rich:scrollableDataTable id="movementHistoryTable"
      value="#{movementHistoryBB.movements}"
      var="movementBE"
      height="530px"
      width="750px"
      cellpadding="3"
      border="1"
      rendered="#{movementHistoryBB.dataLoaded}">
      <rich:column width="155px">
      <f:facet name="header">
      <h:outputText value="Horse"/>
      </f:facet>
      <h:outputText value="#{movementBE.horseName}"/>
      <rich:toolTip direction="top-right"
      mode="client"
      showDelay="0"
      styleClass="tooltip"
      immediate="true"
      layout="block">
      <h:outputText value="Note:" />
      <h:outputText value="#{movementBE.infiniteNote}" styleClass="tooltipData" />
      </rich:toolTip>
      </rich:column>


        • 1. Re: Changed from rich:dataTable to rich:scrollableDataTable
          Anne Chou Newbie

          I have done the same thing - ported a RichFaces dataTable to a scrollableDataTable. My scrollableDataTable looks something like this:

          <a:outputPanel id="searchResults">
          <f:facet name="header">
          <h:outputText value="Search Results"/>
          </f:facet>
          <rich:spacer width="15" height="15" />
          <h:outputText value="No Assets Found"
          rendered="#{empty(displayedItemsList)}"/>
          <rich:scrollableDataTable frozenColCount="1"
          height="200px" width="900px" id="viewItemsTable"
          value="#{displayedItemsList}" var="item" sortMode="single"
          rendered="#{!empty(displayedItemsList)}" >

          <rich:column id="description" sortable="true">
          <f:facet name="header">Description</f:facet>
          <h:outputText id="itemDesc"
          value="#{item.description}">

          <rich:toolTip direction="top-right"
          showDelay="300" styleClass="tooltip"
          immediate="true" layout="block">

          <h:panelGrid columns="4">
          <f:facet name="header">
          <h:outputText value="Asset Details:" />
          </f:facet>
          <h:outputText value="id:" style="font-weight:bold;" />
          <h:outputText value="#{item.id}" />
          ...

          </h:panelGrid>
          </rich:toolTip>
          </h:outputText>
          </rich:column>
          ...
          </rich:scrollableDataTable>

          This tooltip works fine in a regular dataTable. In the scrollableDataTable, I see 2 issues.

          1. The tooltip only appears if the cell is entered from the bottom.
          2. The tooltip appears, but it is only a few pixels high/wide with no text visible inside of the tooltip box.

          Any ideas would be greatly appreciated!

          • 2. Re: Changed from rich:dataTable to rich:scrollableDataTable
            Anne Chou Newbie

            I forgot to mention that I'm using RichFaces 3.1.4.GA.

            • 3. Re: Changed from rich:dataTable to rich:scrollableDataTable
              Ilya Shaikovsky Master

              tooltip with scrollable issues already in jira.