How to show tooltip for <p:tab>?

UI Components for JSF
Post Reply
burferd
Posts: 234
Joined: 01 May 2010, 16:15

20 Sep 2011, 04:59

Using PF 2.2.1, Glassfish 3.2

I have a <p:tabView> with several tabs.
There are too many tabs to display the full descriptor of the tab, so what I want to do is display a mnemonic and display more information when the user moves the mouse over the tab.
There is no "title" attribute for <p:tab> so I tried to use the <p:tooltip> component, but that does not work.

I have tried using the following code, but it does not work.

Code: Select all

                        <p:tab id="aemTab" title="AEM" >
                            <p:tooltip for="aemTab" value="Consist Header Message" />
                            <comp:rptAem id="rptAemComp" />
                        </p:tab>
Is there any way to get a tooltip type information display to work when you move the mouse over the tab in a tabview?

Thanks.
Using PrimeFaces 3.4, Mojarra 2.1.6, Glassfish 3.1.2, NetBerans 7.2, Hibernate 3.2.5 (sometimes)
Windows 7.

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

20 Sep 2011, 08:20

Hi,

I'm not sure if p:tab generates a markup. If not - you are not able to use p:tooltip for p:tab. Use e.g. native qTip2 widget http://craigsworks.com/projects/qtip2/ You can use any jQuery selectors for tooltips. Look in Firebug and figure out which CSS selectors has a p:tag. Just my suggestion.

An JSF component for qTip2 based tooltip with many features which this plugin has, will be available in the PrimeFaces Ext. project very soon (maybe already next week) http://code.google.com/p/primefaces-extensions/
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

imanzano
Posts: 1
Joined: 28 Oct 2014, 13:17

28 Oct 2014, 13:22

Hi,

For people using primefaces 4.0, there is a "titletip" attribute that can be specified in the "p:tab" tag

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 54 guests