• Settings
    • Locale
    • Change the locale of the datepicker, schedule and client side validation messages.

      Language
      English
      English
      English
      French
      German
      German
      German
      Italian
      Korean
      Spanish
      Catalan
      Dutch
      Portuguese
      Portuguese
      Arabic
      Arabic
      Bulgarian
      Bangla
      Bosnian
      Czech
      Greek
      Estonian
      Persian
      Finnish
      Danish
      Hindi
      Indonesian
      Icelandic
      Croatian
      Japanese
      Hungarian
      Hebrew
      Georgian
      Central Kurdish
      Khmer
      Kyrgyz
      Kazakh
      Lithuanian
      Latvian
      Malay
      Norwegian
      Polish
      Romanian
      Russian
      Slovak
      Slovenian
      Serbian
      Serbian
      Swedish
      Thai
      Turkish
      Ukrainian
      Uzbek
      Vietnamese
      Chinese
      Chinese
  • Resources

Tooltip Customized

Tooltips are speech bubble tips with positioning using corners, effects, shared and mouse tracking modes. They are highly configurable and support Ajax updates. Based on qTip2 - Pretty powerful tooltips.

Tooltip Tag Documentation

Advanced Tooltip component.

NameTypeRequiredDefaultDescription
id String false generated Unique identifier of the component in a namingContainer.
rendered boolean false true Boolean value to specify the rendering of the component, when set to false component will not be rendered.
binding UIComponent false generated An EL expression referring to a server side UIComponent instance in a backing bean.
widgetVar String false generated ('widget_' + componentClientId) Name of the client side widget.
adjustX int false 0 A positive or negative pixel value by which to offset the tooltip in the horizontal plane (x-axis). Negative values cause a reduction in the value (moves tooltip to the left).
adjustY int false 0 A positive or negative pixel value by which to offset the tooltip in the vertical plane (y-axis). Negative values cause a reduction in the value (moves tooltip upwards).
atPosition String false bottom right The corner of the target element to position the tooltips corner at.
autoShow boolean false false This flag enables showing tooltips automatically after page loading. Auto shown tooltips can not be global or shared.
converter Converter false EL expression resolves to a converter instance or literal converter ID defining a component converter.
fixed boolean false false When set to true, the tooltip will not hide if moused over, allowing the contents to be clicked and interacted with.
for String false Id of the component to attach the tooltip.
global boolean false false A global tooltip converts each title attribute to a tooltip.
header String false Header or Titlebar of the tooltip. Not applicable on global tooltips.
hideDelay int false 0 Delay time for hiding the tooltip.
hideEffect String false fadeOut Hide effect function.
hideEffectLength int false 500 Duration for hide effect.
hideEvent String false mouseleave Event hiding the tooltip.
mouseTracking boolean false false This flag enables tooltip's positioning in relation to the mouse.
myPosition String false top left The corner of the tooltip to position in relation to the target element.
shared boolean false false A shared tooltip - one tooltip, multiple targets.
showDelay int false 0 Delay time for displaying the tooltip.
showEffect String false fadeIn Show effect function.
showEffectLength int false 500 Duration for show effect.
showEvent String false mouseenter Event displaying the tooltip.
styleClass String false Style class of the tooltip will override ThemeRoller theme.
value Object false Value of the component.
Tag Documentation Widget Source Customized Auto Shown Global
Customized tooltips

Positioning, delay, effects and events can be customized.

Styled
Fade:
Position:
Slide:
Content:
Mouse tracking

Mouse tracking positions the tooltip in relation to the mouse.

Hover over this box to see mouse tracking in action
Shared tooltip

In shared mode a single tooltip is shared between multiple targets, which reduces markup. A typical case is the same tooltip text for each filter field of a datatable.

Please move mouse over filter input fields
SubjectTextTime
subject 0text 01793618636326
subject 1text 11793618636326
subject 2text 21793618636330
subject 3text 31793618636330
subject 4text 41793618636330

Usage


<div class="card">
    <h5>Customized tooltips</h5>
    <p>Positioning, delay, effects and events can be customized.</p>
    <h:form id="formCustomizedTooltips">
        <h:panelGrid id="details" columns="2" cellpadding="4">
            <h:outputLabel value="Focus / Blur: "/>
            <h:panelGroup layout="block" style="padding: 0 0 3px 0;">
                <p:inputText id="focus" title="This tooltip is displayed when input gets the focus"/>
                <pe:tooltip for="focus" showEvent="focus" hideEvent="blur" styleClass="qtip-default"/>
            </h:panelGroup>
            <h:outputText value="Styled "/>
            <h:panelGroup layout="block" style="padding: 3px 0 3px 0;">
                <h:outputLink id="styled" value="#">
                    <h:outputText value="Styled with custom header"/>
                </h:outputLink>
                <pe:tooltip for="styled" value="Override style by using styleClass" header="Style Override" styleClass="qtip qtip-green qtip-rounded qtip-shadow"/>
            </h:panelGroup>
            <h:outputText value="Fade: "/>
            <h:panelGroup layout="block" style="padding: 3px 0 3px 0;">
                <h:outputLink id="fade" value="#">
                    <h:outputText value="Fade Effect"/>
                </h:outputLink>
                <pe:tooltip for="fade" value="Fade effect is used by default" header="Fade" showEffect="fadeIn" hideEffect="fadeIn"/>
            </h:panelGroup>
            <h:outputText value="Position: "/>
            <h:panelGroup layout="block" style="padding: 3px 0 3px 0;">
                <h:outputLink id="pos" value="#">
                    <h:outputText value="Position (top, right)"/>
                </h:outputLink>
                <pe:tooltip for="pos" value="This tooltip positioned at top right" myPosition="top, right" header="Position"/>
            </h:panelGroup>
            <h:outputText value="Slide: "/>
            <h:panelGroup layout="block" style="padding: 3px 0 3px 0;">
                <h:outputLink id="slide" value="#">
                    <h:outputText value="Slide Effect with custom position"/>
                </h:outputLink>
                <pe:tooltip for="slide" value="This tooltip uses slide effect for the animation" showEffect="slideToggle"
                            hideEffect="slideToggle" showDelay="0" myPosition="left center" atPosition="right center" header="Slide"/>
            </h:panelGroup>
            <h:outputText value="Content: "/>
            <h:panelGroup layout="block" style="padding: 3px 0 3px 0;">
                <h:outputLink id="lnk" value="#">
                    <h:outputText value="PrimeFaces Extensions"/>
                </h:outputLink>
                <pe:tooltip for="lnk">
                    <p:graphicImage value="/resources/images/logo.png"/>
                </pe:tooltip>
            </h:panelGroup>
        </h:panelGrid>
    </h:form>
</div>

<div class="card">
    <h5>Mouse tracking</h5>
    <p>Mouse tracking positions the tooltip in relation to the mouse.</p>
    <h:form id="formMouseTracking">
        <h:panelGroup id="demoMouse" layout="block"
                      style="height:200px; line-height:200px; max-width:550px; border:dotted 2px #7F0055; vertical-align:middle; text-align:center">
            <div style="font-weight:bold;">
                Hover over this box to see mouse tracking in action
            </div>
        </h:panelGroup>
        <pe:tooltip for="demoMouse" value="I position myself at the current mouse position"
                    mouseTracking="true" myPosition="top left" adjustX="10" adjustY="10"/>
    </h:form>
</div>

<div class="card">
    <h5>Shared tooltip</h5>
    <p>In shared mode a single tooltip is shared between multiple targets, which reduces markup. A typical case is the same tooltip text for each filter field of a datatable.</p>
    <h:form id="formSharedTooltips">
        <p:dataTable id="sharedTooltipTable" var="message" value="#{dataTableController.messages}"
                     paginator="true" rows="5" paginatorPosition="bottom"
                     filteredValue="#{dataTableController.filteredMessages}">
            <f:facet name="header">
                Please move mouse over filter input fields
            </f:facet>
            <p:column filterBy="#{message.subject}" headerText="Subject">
                <h:outputText value="#{message.subject}"/>
            </p:column>
            <p:column filterBy="#{message.text}" headerText="Text">
                <h:outputText value="#{message.text}"/>
            </p:column>
            <p:column filterBy="#{message.time}" headerText="Time">
                <h:outputText value="#{message.time}"/>
            </p:column>
        </p:dataTable>
        <pe:tooltip value="Type any value to filter datatable" for="@(#formSharedTooltips\:sharedTooltipTable th .p-column-filter)"
                    shared="true" atPosition="top center" myPosition="bottom center" styleClass="qtip-default"/>
    </h:form>
</div>