rich:toolTip question
kevcpu411 Feb 5, 2009 1:39 AMdoes anyone understand what makes the example, listed below, on the richfaces examples page work? I am thoroughly confused by this. I would think an action or actionlistener would need to be added to the toolTip in order to make it pull its data whenever the dataTable entries were moused over. This does not appear to be the case. The action/actionlistener seems to be deprecated for the tooltip. In a nutshell, I just want to be able to populate the tooltip at the moment a mouseover occurs. In my attempt to achieve this task, the default content appears but the getters for the bean are never reached on the server side. Could someone please explain this to me. It seems like you are forced to pre-populate the tooltip in the case of a tooltip nested within a dataTable, which is the way I would like to use it. I really need help on this.
<h:form> <rich:dataTable value="#{toolTipData.vehicles}" width="400" var="vehicle" rowKeyVar="row"> <f:facet name="header"> <h:outputText value="Car Store"/> </f:facet> <rich:column> <f:facet name="header"> <h:outputText value="##" /> </f:facet> <h:outputText value="#{row+1}" /> </rich:column> <rich:column> <f:facet name="header"> <h:outputText value="Make" /> </f:facet> <a4j:outputPanel layout="block"> <rich:toolTip direction="top-right" mode="ajax" showDelay="300" styleClass="tooltip" layout="block"> <a4j:actionparam name="key" value="#{row}" assignTo="#{toolTipData.currentVehicleIndex}" /> <h:panelGrid columns="4"> <f:facet name="header"> <h:outputText value="Vehicle details:" /> </f:facet> <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" /> </h:outputText> <f:facet name="footer"> <h:panelGroup> <h:outputText value="vin: " /> <h:outputText value="#{vehicle.vin}" styleClass="tooltipData" /> </h:panelGroup> </f:facet> </h:panelGrid> </rich:toolTip> <h:outputText id="make" value="#{vehicle.make}"/> </a4j:outputPanel> </rich:column> <rich:column> <f:facet name="header"> <h:outputText value="Model" /> </f:facet> <h:outputText value="#{vehicle.model}" /> </rich:column> <rich:column> <f:facet name="header"> <h:outputText value="Year" /> </f:facet> <h:outputText value="#{vehicle.year}" /> </rich:column> </rich:dataTable> </h:form>