Setting different tooltips on JSF objects in the same jsp page

Article ID: 2440
Last updated: 29 May, 2018
Article ID: 2440
Last updated: 29 May, 2018
Revision: 3
Views: 2006
Posted: 04 Oct, 2012
by Dean J.
Updated: 29 May, 2018
by Gargani A.

Question

How to set different tooltips (different hitmaps) on JViews related objects in the same JSF page?

Cause

In a single JSP page, when there are two JViews objects, for instance two charts (<jvcf:chartView>), two gantt (<jvgf:ganttView>), or two diagrams (<jvdf:diagrammerView>), each with its own tooltip (using the hitmap technology), if both uses the same servlet, only one of two hitmap classes will be used to generate the tooltip.

Answer

In order to have both hitmap classes to generate tooltips, you need to set different servlet with different bitmap explicitly to each JViews JSF object.

So for instance in the case of charts objects, you set in your web.xml:

<servlet>

<servlet-name>MyTooltipController1</servlet-name>

<servlet-class>ilog.views.chart.faces.servlet.IlvFacesChartServlet</servlet-class>

<init-param>

<param-name>hitmap</param-name>

<param-value>MyDefaultToolTipClass1</param-value>

</init-param>

...

</servlet>

<servlet>

<servlet-name>MyTooltipController2</servlet-name>

<servlet-class>ilog.views.chart.faces.servlet.IlvFacesChartServlet</servlet-class>

<init-param>

<param-name>hitmap</param-name>

<param-value>MyDefaultToolTipClass2</param-value>

</init-param>

...

</servlet>

//-----

And in your jsp file:

<jvcf:chartView id="chart1"

chart=...

[...]

This article was:   Helpful | Not helpful
Report an issue
Article ID: 2440
Last updated: 29 May, 2018
Revision: 3
Views: 2006
Posted: 04 Oct, 2012 by Dean J.
Updated: 29 May, 2018 by Gargani A.
Also listed in


Others in this category