jsf Trinidad:更改 tr:表头
我有一个 tr:table ,其 rowSelection 属性设置为“single”。它绘制了一个额外的列,里面有一个单选按钮。但我想更改该列标题处显示的文本。我没有找到任何可以让我完成此任务的属性。我想我应该覆盖一些属性文件,但我在特立尼达文档中没有找到有关此主题的任何内容。
谢谢。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于特立尼达本身似乎没有提供此功能,因此您可以使用 javascript 来完成。这不是一个干净的解决方案,但它会起作用。
首先,打开生成的html代码并找到您感兴趣的代码。如果它有 ID -
document.getElementById("yourformname:tdId")
。如果没有,请尝试通过在表格上调用getElementsByTagName("td")
来访问它。获得后,将其innerHTML
设置为您想要的任何文本。这是一个丑陋的解决方法,但可能会起作用
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 withgetElementsByTagName("td")
called on the table. When you have it, set itsinnerHTML
to whatever text you want.It is an ugly workaround, but will possibly work