Jorge's suggestion of adding the img in the css style for a particular header is also good. The main benefit and problem with that approach is that the image is separate from the text in the column heading, so the text will flow right around the image unless you add an indent to the style also (look at examples using up and down arrows for sorting, for example). You also can't change the image on the fly (e.g. if you want different icons based on some condition or whatever).
Of the two methods below, I prefer the titleKey way, since the code is cleaner, without those backslashes on the quotes in the img tag. You can also avoid that by using single quotes in the img tag: <display:column title="blah<img src='blah.gif'/>" .../> I'm just not sure if that's XHTML compliant, so I try to stay away from things like that. Jorge Barroso said: > Christofer, > > Go with Rick's answer. Disregard mine. I first misread your question > and then missed the obvious solution. Thx, Rick. But yeah, title or > titleKey is the way to go. > > Repeating Rick's example. > > <display:column title="blah<img src=\"blah.gif\"/>" .../> > Or: > <display:column titleKey="title.key" .../> > title.key=blah<img src="blah.gif"/> > > -Jorge > > Christofer Jennings <[EMAIL PROTECTED]> wrote: > Thanks Jorge, > > > So the approach is to use a titleKey and point the key's value to an > image, right? > > > I'm not using struts, but springMVC. > > > ,Chris > > On Mar 1, 2006, at 9:16 AM, Jorge Barroso wrote: > > Put it in the column's body. > > <display:column titleKey="your.title" media="html"> > <html-el:img pageKey="img.icon.save" > altKey="img.icon.save.alt" > titleKey="img.icon.save.alt"/> > </display:column> > > That's struts' html tag. Could just use straight html. > > -J > > Christofer Jennings <[EMAIL PROTECTED]> wrote: How can I put an image in a > column title? > > I have an "Attachments" column and want to show a paperclip. > > I'm using DisplayTag 1.1. > > Thanks for the great tool! > ,boz > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting > language > that extends applications into web and mobile media. Attend the live > webcast > and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > displaytag-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/displaytag-user > > > > > --------------------------------- > Brings words and photos together (easily) with > PhotoMail - it's free and works with Yahoo! Mail. > > > > > --------------------------------- > Yahoo! Mail > Bring photos to life! New PhotoMail makes sharing a breeze. -- Rick Herrick [EMAIL PROTECTED] I haven't got time for inner peace. "No reasonable definition of reality could be expected to permit this."--Albert Einstein, Boris Podolsky and Nathan Rosen in 1935 ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ displaytag-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/displaytag-user

