如何在JSF panelGrid中设置colspan和rowspan? [英] How to set colspan and rowspan in JSF panelGrid?
本文介绍了如何在JSF panelGrid中设置colspan和rowspan?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在JSF < h:panelGrid>中设置
? colspan
和 rowspan
How can I set colspan
and rowspan
in JSF <h:panelGrid>
?
推荐答案
标准JSF实现都不可能。有3种方法可以解决这个问题:
None of both is possible with the standard JSF implementation. There are 3 ways to fix this:
- 自己编写纯HTML。
< h:panelGrid>
基本上呈现HTML< table>
。这样做。 - 创建一个支持此功能的自定义HTML渲染器。然而,它会带来很多汗水和痛苦。
- 使用支持此功能的第三方组件库。
- Tomahawk 有< a href =http://myfaces.apache.org/tomahawk-project/tomahawk/tagdoc/t_panelGroup.html\"rel =noreferrer>
< t:panelGroup>
组件,在< h:panelGrid>
中支持colspan
。 - RichFaces (仅限3.x)有一个
< rich:column>
支持的组件 colspan 和rowspan
en / devguide / html / rich_dataTable.htmlrel =noreferrer>< rich:dataTable>
。 - PrimeFaces 在<$旁边有一个
< p:row>
c $ c>< p:column> 这两者都支持< p:panelGrid>
和< p:dataTable>
(还有< p:columnGroup>
)。
- Tomahawk 有< a href =http://myfaces.apache.org/tomahawk-project/tomahawk/tagdoc/t_panelGroup.html\"rel =noreferrer>
- Write plain HTML yourself. A
<h:panelGrid>
basically renders a HTML<table>
. Do the same. - Create a custom HTML renderer which supports this. It'll however be a lot of sweat and pain.
- Use a 3rd party component library which supports this.
- Tomahawk has a
<t:panelGroup>
component which supportscolspan
in<h:panelGrid>
. - RichFaces (3.x only) has a
<rich:column>
component which supports bothcolspan
androwspan
in<rich:dataTable>
. - PrimeFaces has a
<p:row>
next to<p:column>
which is supported in both<p:panelGrid>
and<p:dataTable>
(also with<p:columnGroup>
).
- Tomahawk has a
这篇关于如何在JSF panelGrid中设置colspan和rowspan?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文