File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes Tooltip with Close button Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Tooltip with Close button" Watch "Tooltip with Close button" New topic

Tooltip with Close button

Himalay Majumdar
Ranch Hand

Joined: Sep 28, 2008
Posts: 324
A tooltip is shown when a user hovers the mouse cursor over the element and disappears when the mouse cursor out that element.
But I have got a requirement where the tooltip keeps open until the user closes it. Is there a way to implement this in RichFaces?

Thank you,

SCJP 1.6, SCWCD 5.0, SCBCD 5.0 [loading..]
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17410

That's not a "tooltip". It's more like a dialog which is opened by hovering a cursor.

By and large, we don't want tooltips that hang around indefinitely, since they clutter up the screen and may block input. However, you should be able to get the effect you want by using a however JavaScript event to make a <div> containing the "tip" visible and put a clickable area within that for a close box (I'd appreciate "ESC" key closing as well, myself).

The closest thing actually built into RichFaces that I can recall is their Dialog capability, but that will block input to the underlying page and fuzz out the background as well (except in IE).

However, there may be something more suitable and I just haven't noticed it.

An IDE is no substitute for an Intelligent Developer.
Himalay Majumdar
Ranch Hand

Joined: Sep 28, 2008
Posts: 324
Our business doesnt seem to like the modal/dialog as compared to tooltip. But thanks for the idea.
I agree. Here's the link:
subject: Tooltip with Close button
It's not a secret anymore!