Meaningless Drivel is fun!*
The moose likes Other Open Source Projects and the fly likes How to put a tool tip in a displaytag column Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "How to put a tool tip in a displaytag column" Watch "How to put a tool tip in a displaytag column" New topic
Author

How to put a tool tip in a displaytag column

Mattia Merenda
Ranch Hand

Joined: Dec 14, 2006
Posts: 47
Hi everybody,
I have a table in my application where I get long strings in a column of my table.
I use displaytag to show the table.
Well,I decided to limit the lenght of this column like this:

<display:column property="jobname" title="JOBNAME" maxLength="20"/>

Now I want when a user hovers one of these strings the full long name of the string should be displayed.

I also want to make something like that for the header names of my table.
I am trying to use tooltiptag.jar to develop the tooltip.
Can anyone give an advice?
How must I solve this problem?
Thank in advance,
Mattia
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61092
    
  66

Originally posted by Mattia Merenda:
I use displaytag to show the table.


This is not an HTML question since you are not writing the HTML, you are letting the displaytag library do it for you.

This is a question on the use of the displaytag library so it's been moved to the approriate forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61092
    
  66

I don't know beans about the displaytag library so I don't know if the tags are set up to allow you to specify a tooltip or not. You'll need to consult the library documentation.

If the library does not have the ability to let you set a tooltip, you could tack one on after the fact with Javascript by adding a title attribute to the appropriate generated HTML tag.

That's a bit fragile though as any change in the way the library generates the HTML could break your code.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How to put a tool tip in a displaytag column