O'Reilly logo

PrimeFaces Beginner's Guide by K. Siva Prasad Reddy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – displaying tooltip for UI components

Let us see how to display tooltips on various events, with different effects and containing HTML elements, such as images, by performing the following steps:

  1. Create a form with input fields and add a <p:tooltip> component to display the tooltip using the following code:
    <h:form title="Tooltip demo form"> <p:panel header="Form with Tooltips"> <h:panelGrid columns="3"> <p:outputLabel value="EmailId:"/> <p:inputText id="emailId" value=""/> <p:tooltip for="emailId" value="Please enter Email Id (Ex: admin@gmail.com)"/> <p:outputLabel value="FirstName:"/> <p:inputText id="firstName" value=""/> <p:tooltip for="firstName" showEvent="focus" hideEvent="blur" value="Please enter FirstName"/> <p:outputLabel ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required