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 tooltips on suggested items using the Itemtip facet

In this section, we will take a look at how to display tooltips with custom content for AutoComplete suggestion items using the Itemtip facet:

  1. Create the AutoComplete component for Tags and display the tag description using itemTip:
    <p:autoComplete id="newPostTags" value="#{postController.newPost.tags}" completeMethod="#{postController.completeTags}" maxResults="10" minQueryLength="2" queryDelay="400" var="t" itemLabel="#{t.label}" itemValue="#{t}" converter="tagConverter" multiple="true" itemTipMyPosition="left top" itemTipAtPosition="right bottom"> <f:facet name="itemtip"> <h:panelGrid columns="2" style="text-align: left"> <f:facet name="header"> Tag Details </f:facet> ...

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