Thanks Rajat for sending code example, but I am looking for Column Decorator example. Also it look like from JavaDoc that now they have replaced this approach with using Interface.
Asif -----Original Message----- From: Rajat Pandit [mailto:[EMAIL PROTECTED] Sent: Thursday, October 23, 2003 12:59 AM To: [EMAIL PROTECTED] Subject: [displaytag-user] RE: displaytag-user digest You can do that making ur own class by extending the TableDecorators class. Here is the sample code. It took me a long time to figure that out. I might have not looked hard enough, but the best way that I personlly think is to download the src code, compile it on ur machine and run javadoc on it. package com.hedging.decorators; import org.displaytag.decorator.TableDecorator; import com.hedging.Transaction; /** * Created @ Viraj Solutions (I2I) * Date: Oct 5, 2003 * Time: 5:39:32 AM * Copyright reserved 2001-2003 */ public class TransactionDecorator extends TableDecorator { String[] call = new String[2]; public TransactionDecorator() { super(); /** * We shall increment the index * value to get the actual value * of what has to be done. * 1: Selling Call * 2: Buying Call */ this.call[0] = "Selling Call"; this.call[1] = "Buying Call"; } public String getType() { /** this is where the magic happens!! * Transaction object (ArrayLIst) is the object * that I am using to render the table */ byte type = ((Transaction)this.getCurrentRowObject()).getType(); return this.call[(type - 1)]; } } Hope this helps, to let me know if you need any help! Great work matt!!! --__--__-- Message: 3 From: Asif Rashid <[EMAIL PROTECTED]> To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> Date: Wed, 22 Oct 2003 19:10:20 -0400 Subject: [displaytag-user] Column decorator Reply-To: [EMAIL PROTECTED] Is there any example code available which shows how to develop column decorator? Asif -----Original Message----- ------------------------------------------------------- This SF.net email is sponsored by: The SF.net Donation Program. Do you like what SourceForge.net is doing for the Open Source Community? Make a contribution, and help us add new features and functionality. Click here: http://sourceforge.net/donate/ _______________________________________________ displaytag-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/displaytag-user ------------------------------------------------------- This SF.net email is sponsored by: The SF.net Donation Program. Do you like what SourceForge.net is doing for the Open Source Community? Make a contribution, and help us add new features and functionality. Click here: http://sourceforge.net/donate/ _______________________________________________ displaytag-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/displaytag-user

