Page 1 of 1

Tooltip for TimelineEvent

Posted: 16 Jan 2013, 17:06
by ramo102
Hi all,

I would like to know if it is possible to associate a tooltip to a TimelineEvent.

Thanks in advance.

Re: Tooltip for TimelineEvent

Posted: 18 Jan 2013, 08:24
by nileshmali
Have you tried custom events?

I think you can try custom events and associate tooltip to event.

Let me know if this approach works or not.

Re: Tooltip for TimelineEvent

Posted: 18 Jan 2013, 18:35
by ramo102
I tried to associate a tooltip to a timeline event, but my approach does not work.

Code: Select all

	<h:form id="mainForm">
	<p:spacer width="100%" height="10" />
		<p:tab title="accordion">
			<pe:timeline id="accTimeline" value="#{timelineController.unavailabilities}"
				<p:ajax event="eventSelect" 

	<pe:tooltip for="#{timelineController.selectedEvent}" value="Informazioni principali (da definire)" 
		showEvent="slideToggle" hideEvent="slideToggle" />
	<p:dialog id="viewDialog" modal="true" 
			dynamic="true" widgetVar="viewDlg" 
			appendToBody="true" resizable="false"
			header="Dettagli" width="350">
			<h:panelGrid columns="2">
				<h:outputText value="Responsabile:" />
				<h:outputText value="#{timelineController.selectedEvent.title}" />
				<h:outputText value="Data Inizio:" />
				<h:outputText value="#{timelineController.selectedEvent.startDate}">
					<f:convertDateTime pattern="dd MMM yyyy" />
				<h:outputText value="Data Fine:" />
				<h:outputText value="#{timelineController.selectedEvent.endDate}">
					<f:convertDateTime pattern="dd MMM yyyy" />

If I uncomment the pe:tooltip object, the following exception occurs:

Code: Select all

java.lang.IllegalArgumentException: ""
	at javax.faces.component.UIComponentBase.findComponent(
	at org.primefaces.extensions.util.ComponentUtils.findTarget(
	at org.primefaces.extensions.util.ComponentUtils.findTarget(
	at org.primefaces.extensions.component.tooltip.TooltipRenderer.encodeEnd(
	at javax.faces.component.UIComponentBase.encodeEnd(
	at javax.faces.component.UIComponent.encodeAll(
	at javax.faces.render.Renderer.encodeChildren(
	at javax.faces.component.UIComponentBase.encodeChildren(
	at javax.faces.component.UIComponent.encodeAll(
	at javax.faces.component.UIComponent.encodeAll(
	at javax.faces.component.UIComponent.encodeAll(
	at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(
	at com.sun.faces.application.view.MultiViewHandler.renderView(
	at com.sun.faces.lifecycle.RenderResponsePhase.execute(
	at com.sun.faces.lifecycle.Phase.doPhase(
	at com.sun.faces.lifecycle.LifecycleImpl.render(
	at javax.faces.webapp.FacesServlet.service(
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(
	at org.apache.catalina.core.StandardWrapperValve.invoke(
	at org.apache.catalina.core.StandardContextValve.invoke(
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(
	at org.apache.catalina.core.StandardHostValve.invoke(
	at org.apache.catalina.valves.ErrorReportValve.invoke(
	at org.apache.catalina.valves.AccessLogValve.invoke(
	at org.apache.catalina.core.StandardEngineValve.invoke(
	at org.apache.catalina.connector.CoyoteAdapter.service(
	at org.apache.coyote.http11.AbstractHttp11Processor.process(
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
	at java.util.concurrent.ThreadPoolExecutor$

Re: Tooltip for TimelineEvent

Posted: 18 Jan 2013, 19:52
by Oleg
I would like to know if it is possible to associate a tooltip to a TimelineEvent.
What is the problem? I don't know if you can assign a styleClass to timeline events, but if you can it, you can use "forSelector" attribiute then, e.g.

Code: Select all

<pe:tooltip value="Informazioni principali (da definire)"  forSelector=".styleClassOfTimelineEvent"/>
Simple look in Firebug what CSS class has a container element for timeline event.

Re: Tooltip for TimelineEvent

Posted: 23 Jan 2014, 21:01
by yaaska
Ramo, Oleg,

Have you guys figured out if you can put tooltips on each timeline item.

I just started using this extension and need help with toolltips as well.

I need to be able to pass some information from the bean side and once you mouse over a timeline item, I want to display that info.

This is the demo I am using. ... custom.jsf



Re: Tooltip for TimelineEvent

Posted: 17 Oct 2014, 22:04
by florin.manea
The trick is:
  • place tooltips outside the pe:timeline definition
  • define in the data associated with the timeline events some unique identifier and based on add unique class identifier to each event
  • use jquery type selectors in tooltip for attribute (using the same class definition algorithm as mentioned before)
  • add ajax rangechanged event to update the container of externally defined tooltips; if one timeline event is far enough from visible area it is not created at first page GET so tooltip for attribute will not work

Code: Select all

<pe:timeline id="timelineInvoicing" value="#{phaseController.invoicingMilestonesModel}" var="milestone" varGroup="group"  widgetVar="timelineInvoicingWdgt">
		<f:facet name="group" >
				<h:outputText value="#{group}" style="font-weight:bold;" />  

		<h:panelGrid columns="1" class="invoicingMilestonesModelClass4Id_#{}" >
				<h:outputText value="#{milestone.value}">
						<f:convertNumber pattern="#,##0" />

		<p:ajax event="rangechanged" global="false" update="tooltips4TimelineInvoicing"/>

<p:panel id="tooltips4TimelineInvoicing" style="display: none">
		<ui:repeat value="#{}" var="milestone4Tooltip" >
				<p:tooltip for="@(.invoicingMilestonesModelClass4Id_#{})">
						<h:outputText value="#{}" >
								<f:convertDateTime pattern="dd.MM.yyyy" />


Re: Tooltip for TimelineEvent

Posted: 22 Oct 2014, 06:12
by blackbee045
Thankx for this great and very helpful help......

Re: Tooltip for TimelineEvent

Posted: 26 Jul 2019, 23:32
by Eiten

I know that is old post but have one question. I set up it in me project and is it working autil timeline range change. After that stops work, ay updates do not help.What is the reason and how to solve it?

Re: Tooltip for TimelineEvent

Posted: 27 Jul 2019, 14:19
by Melloware
Thanks for posting your question in PF forum instead since the component has moved to PF from PFE.

But I think your issue is: