This week's giveaway is in the Programmer Certification (OCPJP) forum.
We're giving away four copies of Java Mock Exams (software) and have David Mayer on-line!
See this thread for details.
Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Richfaces 4 tooltip not displaying

 
Aj Jaro
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been trying to use the Richfaces 4 tooltip demo from the RichFaces Showcase, but I can't get the tooltip to show up. I've tried variations on the two tooltips shown below, but I can't get any tooltip information to display. Do you know what I'm missing to make this work?

 
Tim Holloway
Bartender
Posts: 18467
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think that tooltips only work when attached to input controls. So they wouldn't be applied to links or panels.

You can fake it, though, since basically a tooltip is a floating HTML DIV that's made visible when you mouse into/over a page element. It's made invisible by mousing out and/or a timeout on mouse movement.
 
Aj Jaro
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's actually not the case. If you look at the RichFaces showcase you'll see that tooltips can be applied to more components than just input controls.

The resolution to this issue was to use the <h:body> tag instead of the HTML body tag. RichFaces creates some additional JavaScript on the close of the <h:body> tag that's used on tooltips.

Thanks for the suggestions though.
 
Tim Holloway
Bartender
Posts: 18467
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK. I think maybe that that was a limitation in RichFaces 3 maybe.

Definitely use the h:head and h:body tags in all JSF2 webapps! As you noted, the proper Javascript doesn't get generated otherwise. Among other things!
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!