在 JSF 中将列分组到单个标题下
有没有办法使用 JSF 将两个或多个列分组到 JSF 中的单个父列下? 我有一个 dataTableEx,其中包含 hx:columnEx 列。 我想要的是这样的:
[MAIN HEADER FOR COL1+2 ][Header for Col 3+4]
[ COL1 Header][COL2 Header][COL3 ][COL 4 ]
Data Data Data Data
Data Data Data Data
Data Data Data Data
Data Data Data Data
数据数据数据数据
谢谢
Is there a way using JSF to group two or more columns under a single parent column in JSF? I have a dataTableEx with hx:columnEx columns inside of it. What I want is something like this:
[MAIN HEADER FOR COL1+2 ][Header for Col 3+4]
[ COL1 Header][COL2 Header][COL3 ][COL 4 ]
Data Data Data Data
Data Data Data Data
Data Data Data Data
Data Data Data Data
Data Data Data Data
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您也许可以通过表头、panelGrid 和一些 CSS 来实现您想要的效果。
You can probably achieve what you want with the table header, a panelGrid and a little CSS.
您最好的选择可能是对第一个标头使用嵌套表(外部表中的第一个标头,以及嵌套表中的第二个标头和数据),以便它看起来像两个标头。
Your best bet is likely to use nested tables for the first header (first header in the outer table, and your second header and data inside a nested table) so that it looks like two headers.
也许您可以查看高级组件库,例如 RichFaces,它为数据表提供更复杂的结构,例如 示例。
Maybe you can have a look to advanced components libraries, such as RichFaces that offer more complex structures for datatables, like in this example.