This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Nov 2, 2012, 6:53 PM
10 Posts
topic has been resolvedResolved

Apply a Tooltip to a Page Link Node

  • Category: Dojo and Client Side JavaScript
  • Platform: Not Applicable
  • Release: 8.5.3
  • Role: Developer
  • Tags: Tooltip Application Layout
  • Replies: 4
Does anyone know if it possible to apply a tooltip dialog to a Application Layout Page Link Node.   I would like to have a hover information box on several Tabs on the Title bar.  If there another method to accomplish this that would be fine as well.
 
Thanks in advance
Bob
Nov 2, 2012, 10:24 PM
298 Posts
Do you mean the pageTreeNode?
If so, than no, you can't do that since the nodes are not controls. There is no way I know of to get programmatically, at least not in SSJS. You might be able to add a client side event in the onPageLoad to add a event to open a Dojo tooltip since each node becomes an
  • element. I haven't tried that. Howard
  • Nov 4, 2012, 4:26 PM
    366 Posts
    Re: Apply a Tooltip to a Page Link Node
     If you add the following code to the XPages CSJS onClientLoad event then it will add an id attribute to each of the page link nodes and then set the tooltip for each of those nodes.
     

    var nl = dojo.query("div header ul li a");

    var i = 1;

                dojo.forEach(nl, function(selectedItem) {

                     dojo.attr(selectedItem, {

                     id: "selected"+ i

                     })

                     i+=1;

                }); // end forEach



    new dijit.Tooltip({

    connectId: "selected1",

    label: "This is the tooltip for node 1"

    });

    new dijit.Tooltip({

    connectId: "selected2",

    label: "This is the tooltip for node 2"

    });

    new dijit.Tooltip({

    connectId: "selected3",

    label: "This is the tooltip for node 3"

    }); 
    Nov 5, 2012, 5:48 PM
    10 Posts
    Re: Apply a Tooltip to a Page Link Node
    Paul
     
    Thanks for your example, learn a little more on Dojo and html.  I had to adjust the code a bit to get the query and tooltip to work.  Below is the code that worked for me.  
     
    var nl = dojo.query("ul li div a");
    var i = 1;
    dojo.forEach(nl, function(selectedItem) {
        dojo.attr(selectedItem, {
            id : "selected" + i
        })
        i += 1;
    }); // end forEach
     
    new dijit.Tooltip({
    connectId: ["selected1"],
    label: "This is the tooltip for node 1"
    });

    new dijit.Tooltip({
    connectId: ["selected2"],
    label: "This is the tooltip for node 2"
    });
     
    Regards
    Bob
     
    Nov 6, 2012, 4:45 AM
    366 Posts
    Re: Apply a Tooltip to a Page Link Node
    Glad it's working for you.
     
    Yes the query syntax will vary depending upon on how the navigator is implemented.
     
     

    This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

    HCL Software Customer Support Portal for U.S. Federal Government clients
    HCL Software Customer Support Portal