简体   繁体   English

jsf特立尼达:更改tr:table标头

[英]jsf Trinidad: Change tr:table header

I have a tr:table with the rowSelection property set to "single". 我有一个tr:table,其中rowSelection属性设置为“ 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. 谢谢。

As Trinidad itself doesn't seem to offer this, you can do it with javascript. 由于特立尼达(Trinidad)本身似乎不提供此功能,因此您可以使用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. 首先,打开生成的html代码,然后找到您感兴趣的。 If it has an ID - document.getElementById("yourformname:tdId") . 如果具有ID- document.getElementById("yourformname:tdId") If it doesn't, try accessing it with getElementsByTagName("td") called on the table. 如果不是,请尝试使用表上调用的getElementsByTagName("td")进行访问。 When you have it, set its innerHTML to whatever text you want. 拥有后,将其innerHTML设置为所需的任何文本。 It is an ugly workaround, but will possibly work 这是一个丑陋的解决方法,但可能会起作用

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM