None of both is possible with the standard JSF implementation. There are 3 ways to fix this:
- 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 supportscolspanin<h:panelGrid>. - RichFaces (3.x only) has a
<rich:column>component which supports bothcolspanandrowspanin<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