jsf Trinidad:更改 tr:表头

发布于 2024-08-09 03:31:52 字数 159 浏览 7 评论 0原文

我有一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

贪恋 2024-08-16 03:31:52

由于特立尼达本身似乎没有提供此功能,因此您可以使用 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 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文