• 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
Saloon Keeper
Posts: 18367
56
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
Saloon Keeper
Posts: 18367
56
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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic