1 Reply Latest reply on Oct 31, 2014 5:51 AM by sivaprasad9394

    Tooltip is not displaed on mouseover of image through programatically

    kishi_kiran

      Hello All, I have a problem, trying to use a Tooltip created programtically to show on certain image, I am using Richfaces 4.2.1.Final,  javaEE6, Facelets 2.0

      Here is the java code snippet where I create the Tooltip:

       

      private UIComponent createLocationContainer(){

      UIComponent locationContainer = this.htmlGenerator.createContainer("locationContainer");

      1. locationContainer.getChildren().add(
      2. this.htmlGenerator.ImageTag(icon_path/sampleImage.png", ""));

      UITooltip tooltip = new UITooltip();

      tooltip.setFollowMouse(false);

      tooltip.setHorizontalOffset(0);

      tooltip.setVerticalOffset(0);

      tooltip.setStyleClass("infoPopup bigPopup");

        tooltip.getChildren().add(

                      this.htmlGenerator.createTextLine("sample Text”, "heading"));

      1. locationContainer.getChildren().add(tooltip);

      return locationContainer;

      }

      public UIComponent createContainer(String cssClass) {

              HtmlPanelGroup hop = new HtmlPanelGroup();

              hop.setStyleClass(cssClass);

              hop.setLayout("block");

              return hop;

          }

      Here the ‘locationContainer’ is attached to a child of other HtmlPanelgroup,

      The problem here is : the tool tip is created to the htmlpanel group as a chiled, but when ever I mouseover on the image tooltip is not being displayed.

      Here is the console output:

       

      image attachment.

       

      From this console also I can see that the tool tip is being added to the image, and I have observed that the css classes display: none for tooltip ,

      Can someone help me out, is there any mouse over functionality needs to be added to the tool tip through programmatically?

      Like It tooltip to be displayed whenever mouse over on the image , it is not happening.