Hey Anja
 
Thanks for your kind support. Also no issues with mailing me directly... I'm ok with that. I completly agree with your info specified in the mail. Let me put my question in another way...
 
Say I've got a table thru Display tag. In that i've to make the elements in the 2nd column as references to the respective pages. In the reference URL I'm able to build up the static url and the dynamic part(parameters) provided i get the parameter values. For example :
 
Static URL being www.yahoo.com and the dynamic part being param1=nagraj&param2=rose&param3=14. Now the 3 param values (marked in bold) are nothing but the values of the corresponding row and succesive columns.
 
The final url should be something like
 
I've to dig out other column values inside my ColumnDecorator. I prefer to use ColumnDecorators over any self made class so that it can be kept clean of any wrong implementations.
 
Hope now my question is more understandable.
 
Please do suggest your approach to it.
 
Thanks & regards
Nagraj.
 
----- Original Message -----
From: Anja Gruß
Sent: Friday, June 02, 2006 1:31 PM
Subject: [displaytag-user] customizing column decorators for CurrentRowObject

Hello
 
first, sorry for the direct reply, I'm not much familiar with the use mailing lists.
 
I'm not sure how exactly you tried, so if I don't tell you anything new here, I'm sorry ...never worked with a column decorator, as far as I understand the doc it really only knows its column value.
 
With a TableDecorator based class you have a getCurrentRowObject() method available and should then be able to access any getter in it.
 
 
Hope this is of some help to you
 
regards
 
/anja
 

Hi folks,

I've got a problem with the usage of column decorators. I'm using them for bringing the hyperlinks to a particular column data.

Now say I want the 2nd column to be appearing as links in which i want the url to contain parameter values of the 3rd, 4th and 5th column. I'm able to write a generic code block for generating the url in the decorate() method of ColumnDecoratorImpl. But instaed of getting the whole CurrentRowObject(DynaBean object) of a row, i can get just the respective column value for that cell. How can i write a customization for the same??

1 solution would be setting the CurrentRowObject object in the pageContext (session/request) in the initRow() method of the TableDecorator class. This value then i would be able to get thru the same PageContext element. But i'm not sure whether this is a right practice to do so. Also i'm worried about the performance for a table of 17 columns with 4 link fields and with 5000+ rows.

Please note that I'm planning for a generic decorator that can work for all my reports. Thus nothng should be specific to the above given scenario.

Kindly put some insight into this.

 


No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.8.0/352 - Release Date: 5/30/2006
_______________________________________________
displaytag-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to