I'll try to send to the list again, but I'm not sure if it will work. The decorator 
you need to fix is pretty simple stuff. It may look like:

import org.displaytag.decorator.ColumnDecorator;

public class LinkDecorator implements ColumnDecorator {
    public String decorate(Object columnValue) {        
       return "<a href='#' onclick='dothis('"+columnValue.toString()+"');"+">" + 
columnValue.toString() + "</a>";
    }
}
-------------

You call it by:

<display:column property="shortName" title=
"Agency" sort="true" decorator="your class
path.LinkDecorator" />

------
Ok?

Cheers,
Bard


----- Original Message -----
From: Frederic Dernbach <[EMAIL PROTECTED]>
Date: 29 Nov 2003 18:43:11 +0100
To: Display Tag Mailing List <[EMAIL PROTECTED]>
Subject: [displaytag-user] onclick attribute

> Hello everybody,
> 
> I'm trying to evaluate the display tag library for future usage (I
> haven't actually tried it yet).
> 
> Looking at the reference documentation, I do not see any attribute for
> the <display:column> tag such as the good old 'onclick' attribute of a
> traditional <html:text> tag.
> 
> How can you call Javascript functions with the display tag library ?
> Typically I need to set 'href' to "#" and have a 'onclick' attribute for
> calling javascript functions.
> 
> Any idea ?
> 
> Fred
> 
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> Does SourceForge.net help you be more productive?  Does it
> help you create better code?  SHARE THE LOVE, and help us help
> YOU!  Click Here: http://sourceforge.net/donate/
> _______________________________________________
> displaytag-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/displaytag-user

-- 
___________________________________________________
OperaMail free e-mail - http://www.operamail.com
OperaMail Premium - 28MB, POP3, more! US$29.99/year

Powered by Outblaze


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
displaytag-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to