-
1. Re: Tooltip is not displaed on mouseover of image through programatically
michpetrov Nov 3, 2014 3:38 AM (in response to kishi_kiran)Hi,
the tooltip is attached to the div, not to the image. Check your CSS, if the div has zero height or a high z-index the tooltip wouldn't appear.
-
2. Re: Tooltip is not displaed on mouseover of image through programatically
kishi_kiran Nov 3, 2014 6:40 AM (in response to michpetrov)Hi Michal,
I have checked the CSS, there is no high z-index and for div I have specified height on css class, but no luck.
and here is the working version, which I have used in Rich faces 3.3.1, the console output for the working version is like this, which is differe from the current version RF 4 (what currently I am working on)
in this version the tooltip is working on mouse over.
the current version console output is:
what I have observed is the span structure after image tag is different from both, so will it causes to stop the mouse over tooltip ?
-
3. Re: Tooltip is not displaed on mouseover of image through programatically
michpetrov Nov 3, 2014 7:50 AM (in response to kishi_kiran)There are many differences between RF 3 and RF 4, difference in HTML is to be expected. Try to set showEvent to "mouseover", that's the default in RF 3.
-
4. Re: Tooltip is not displaed on mouseover of image through programatically
kishi_kiran Nov 3, 2014 8:17 AM (in response to michpetrov)Hi Michal,
I have tried this
terminalServicesTooltip.setShowEvent("mouseover");
still same problem, can we set it through programmatically?
-
5. Re: Tooltip is not displaed on mouseover of image through programatically
michpetrov Nov 4, 2014 5:44 AM (in response to kishi_kiran)Kishi kiran wrote:
Hi Michal,
I have tried this
terminalServicesTooltip.setShowEvent("mouseover");
still same problem, can we set it through programmatically?
Yes, I assumed that's how you were doing it.
-
6. Re: Tooltip is not displaed on mouseover of image through programatically
sesharao_n Dec 1, 2014 2:44 AM (in response to kishi_kiran)Hi Kiran,
By setting id to the component through programmatically, I am able to resolve this.
Below you can find some sample code,
private UIComponent createLocationContainer(IExecutionPlan IEplan) {
UIComponent locationContainer = this.htmlGenerator.createContainer("locationContainer");
locationContainer.setId("v" + Calendar.getInstance().getTimeInMillis() + new Random().nextInt()); //Setting Unique Id
serviceVisitedNodes(locationContainer);
UIComponent nodeNameContainer = this.htmlGenerator.createContainer("nodeNameContainer");
nodeNameContainer.setId("v" + Calendar.getInstance().getTimeInMillis() + new Random().nextInt()); //Setting Unique Id
/** Adds a popup with terminalservices * */
UITooltip terminalServicesTooltip = new UITooltip();terminalServicesTooltip.setFollowMouse(false);
terminalServicesTooltip.setHorizontalOffset(0);
terminalServicesTooltip.setVerticalOffset(0);
terminalServicesTooltip.setStyleClass("infoPopup bigPopup");terminalServicesTooltip.getChildren().add(
this.htmlGenerator.createTextLine("Terminal Services in " + location.getName(), "heading"));
terminalServicesTooltip.getChildren().add(this.createTerminalServiceContainer(IEplan));nodeNameContainer.getChildren().add(terminalServicesTooltip);
//Tool tip should also be popped up when hovering the globe itself
locationContainer.getChildren().add(terminalServicesTooltip);nodeNameContainer.getChildren().add(this.htmlGenerator.createTextLine(this.location.getName(), "nodeHeading"));
locationContainer.getChildren().add(nodeNameContainer);
return locationContainer;
}
-
7. Re: Tooltip is not displaed on mouseover of image through programatically
kishi_kiran Dec 1, 2014 2:54 AM (in response to sesharao_n)Thank You Sesha Rao, It was really nice,
It got worked for me, one we place the ids for the components.
Thank You!