Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
5 replies Latest Post - ‏2012-11-16T13:51:35Z by kevintap
SystemAdmin
SystemAdmin
9029 Posts
ACCEPTED ANSWER

Pinned topic Hide tooltip

‏2012-11-06T18:32:13Z |
Hi,

I implemented the dojotooltip builder in my model, to dispaly comments , its working fine.but if comments doesn't exist that time also its showing small tooltip, we need to hide when comments are empty.

Senirio: some list of records are display in grid. in the comments is one of field. some records may have comments , some may not have. if comments are there tooltip is displaying.. if comments are not available , still its showing empty tooltip, need to hide emtpty tooltip. Could you plz help me on this .. Thanks.....
Updated on 2012-11-16T13:51:35Z at 2012-11-16T13:51:35Z by kevintap
  • kevintap
    kevintap
    746 Posts
    ACCEPTED ANSWER

    Re: Hide tooltip

    ‏2012-11-06T19:07:54Z  in response to SystemAdmin
    I would suggest using a Visibility Setter to handle this. The dojo tooltip is a single <div> tag on the page. You can wrap this <div> tag with a Visibility Setter to prevent it from being rendered if the tooltip would contain no text.

    You may need to use an advanced page location to locate the tooltip tag. Something like this may work:
    Page page1 NameSearch Col1 XPath ../div
    assuming that the dojo tooltip was targeted for the Col1 tag on page1.
    • SystemAdmin
      SystemAdmin
      9029 Posts
      ACCEPTED ANSWER

      Re: Hide tooltip

      ‏2012-11-13T16:33:10Z  in response to kevintap
      Hi

      As I tried by using the Visibility Setter but issue is , if comments is available then it display the tolltip. if commnets are availeble the entire column is hiding, As u suggested using div.. but I didn't found any Div tag for tooltip, so can't able to apply blow solution. is there any another way to achieve that thanks...

      I would suggest using a Visibility Setter to handle this. The dojo tooltip is a single
      tag on the page. You can wrap this
      tag with a Visibility Setter to prevent it from being rendered if the tooltip would contain no text.

      You may need to use an advanced page location to locate the tooltip tag. Something like this may work:
      Page page1 NameSearch Col1 XPath ../div
      assuming that the dojo tooltip was targeted for the Col1 tag on page1.
      • kevintap
        kevintap
        746 Posts
        ACCEPTED ANSWER

        Re: Hide tooltip

        ‏2012-11-13T19:09:13Z  in response to SystemAdmin
        I've attached a sample model demonstrating the use of a Visibility Setter to hide the tooltip <div> when the tooltip text is empty.
        • SystemAdmin
          SystemAdmin
          9029 Posts
          ACCEPTED ANSWER

          Re: Hide tooltip

          ‏2012-11-16T08:20:29Z  in response to kevintap
          Hi kevintap

          Thanks for giving sample model. finally we got success to hide the empty tooltip. Thanks for your help.
          Could you please explanin the code which is mentiioned in visibility Setter in Adv option as its is showing as Page vf_ViewPage NameSearch id "XPath ../div". Thanks...
          • kevintap
            kevintap
            746 Posts
            ACCEPTED ANSWER

            Re: Hide tooltip

            ‏2012-11-16T13:51:35Z  in response to SystemAdmin
            WEF supports an Advanced Page Location technique, which uses a syntax as I described. You can specify various options for determining the Page(s) to locate markup on, the html tag names to locate, optional XPath like extensions to navigate within the html markup, and various insert options. The XPath sample that I provided here first instructs WEF to locate the tag named "id" on the page "vf_ViewPage". This will look for any tag with a name attribute set to id, for example:
            <span name="id">
            Once it finds this tag on the page, it evaluates the XPath (../div) which instructs it to navigate to the parent element and then back down to the first <div> child. Using this technique you can target any tag on the page regardless of whether it has a specific name attribute, for example:
            <div name="parent">
            <div target="me">
            </div>
            <span name="id">
            </span>
            </div>

            So, using the advanced page location that I described, you can target the <div> with the attribute target="me" on this page even though it doesn't have a name attribute.

            The following links have additional information on the advanced page location syntax.

            http://www-10.lotus.com/ldd/pfwiki.nsf/dx/specifying-page-location-using-xpath

            http://publib.boulder.ibm.com/infocenter/wpfhelp/v6r1m5/index.jsp?topic=%2Fcom.bowstreet.designer.doc%2Fdesigner%2Fr_locating_builders_advanced.htm
            The postings on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.