This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
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


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Tooltip with Close button" Watch "Tooltip with Close button" New topic
Author

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,
Himalay


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

Joined: Jun 25, 2001
Posts: 16158
    
  21

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
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: http://aspose.com/file-tools
 
subject: Tooltip with Close button