1 Reply Latest reply on Nov 17, 2008 10:53 AM by Ilya Shaikovsky

    dataTable with tooTip

    john hedden Newbie

      I know from the live examples that its possible to attach the toolTip to a column within a row but is it possible to attach the toolTip to lets say a onRowMouseOver on the row? Ive tried various times with no luck and figured Id ask if it was even possible before I proceeded any further.

        • 1. Re: dataTable with tooTip
          Ilya Shaikovsky Master


           <rich:dataTable value="#{toolTipData.vehicles}" width="400"
           var="vehicle" rowKeyVar="row">
           <f:facet name="header">
           <h:outputText value="Car Store"/>
           <f:facet name="header">
           <h:outputText value="##" />
           <h:outputText value="#{row+1}" />
           <f:facet name="header">
           <h:outputText value="Make" />
           <a4j:outputPanel layout="block">
           <rich:toolTip direction="top-right" mode="ajax" showDelay="500"
           styleClass="tooltip" layout="block" id="tooltip" attached="false">
           <a4j:actionparam name="key" value="#{row}"
           assignTo="#{toolTipData.currentVehicleIndex}" />
           <h:panelGrid columns="4">
           <f:facet name="header">
           <h:outputText value="Vehicle details:" />
           <h:outputText value="make:" />
           <h:outputText value="#{vehicle.make}" styleClass="tooltipData" />
           <h:outputText value="model:" />
           <h:outputText value="#{vehicle.model}" styleClass="tooltipData" />
           <h:outputText value="year:" />
           <h:outputText value="#{vehicle.year}" styleClass="tooltipData" />
           <h:outputText value="milage:" />
           <h:outputText value="#{vehicle.milage}" styleClass="tooltipData" />
           <h:outputText value="zip:" />
           <h:outputText value="#{vehicle.zip}" styleClass="tooltipData" />
           <h:outputText value="listed:" />
           <h:outputText value="#{vehicle.listed}" styleClass="tooltipData">
           <f:convertDateTime dateStyle="short" />
           <f:facet name="footer">
           <h:outputText value="vin: " />
           <h:outputText value="#{vehicle.vin}" styleClass="tooltipData" />
           <h:outputText id="make" value="#{vehicle.make}"/>
           <f:facet name="header">
           <h:outputText value="Model" />
           <h:outputText value="#{vehicle.model}" />
           <f:facet name="header">
           <h:outputText value="Year" />
           <h:outputText value="#{vehicle.year}" />
           <rich:componentControl event="onRowMouseOver" for="tooltip" operation="show"/>
           <rich:componentControl event="onRowMouseOut" for="tooltip" operation="hide"/>

          this works fine for me.