Search code examples
primefaceshyperlinktooltip

How to add a link inside a tool-tip Prime faces


I tried using the example given in the Prime Faces guide but I can't find the way to actually add the link inside the tooltip, besides how can I hideDelay it?

Lets start with this:

 <h:outputLink id="lnk" value="#">
 <h:outputText value="PrimeFaces Home" />
 </h:outputLink>
   <p:tooltip for="lnk">
 <h:outputText value="Visit PrimeFaces Home" />
  </p:tooltip>

Solution

  • Uhhmmmm there only is a link outside the tooltip in your code. There is no link inside it.

    <h:outputLink id="lnk" value="#">
       <h:outputText value="PrimeFaces Home" />
    </h:outputLink>
    <p:tooltip for="lnk">
        <h:outputLink id="lnk" value="http://www.primefaces.org">
            <h:outputText value="Visit PrimeFaces Home" />
        <h:outputLink>
    </p:tooltip>
    

    Works