tags:

views:

292

answers:

1

Hi. I have a tr:table with the rowSelection property set to "single". It draws a extra column with a radio buttons inside. But I want to change the text displayed at that column's header. I don't find any property that allow me to accomplish this. I guess I should overwrite some properties file but I haven't found anything on this topic in the Trinidad documentation.

Thanks.

+1  A: 

As Trinidad itself doesn't seem to offer this, you can do it with javascript. It is not a clean solution, but it will work. First, open the generated html code and find the in which you are interested. If it has an ID - document.getElementById("yourformname:tdId"). If it doesn't, try accessing it with getElementsByTagName("td") called on the table. When you have it, set its innerHTML to whatever text you want. It is an ugly workaround, but will possibly work

Bozho
Thanks for your help, Bozho. I have thought this before but I was looking for a more elegant way to change the column text. I guess I'll have to do something like you say though.+1 for giving a workaround.
Averroes
Perhaps you can dig into Trinidad source code and modify it to fit your needs. I looked through it a bit and noticed a so called SpecialColumn class that is used for the column you said. You will have to add a property to the component, and modify the renderer a bit. Not easy anyway, but more elegant than a JS solution :)
Bozho