JSF RichTable combining rows / columns in header

What I want to do is make this layout with RichTable in its header to have 3 columns:

 +---+---+-------+ | | | 3 5 | | 1 | 2 |-------+ | | | 4 6 | +---+---+-------+ 

I used this (8.2) resource to do this. Rich-faces 4.0.0

But instead, I get a simple row table without any merges.

Could you shed some light on this?

Update:

About the answer from Vasily Lukach . In my case (if I copy the stick of this code), I have this result (I use hard-coded values ​​to simplify it):

as we can see .. it is a mess

My code is as follows:

  <rich:dataTable id="mydatatable" value="#{applicationListBean.data}" > <f:facet name="header"> <h:outputText value="msg.txnLineItems" /> <rich:columnGroup> <rich:column rowspan="2"> <h:outputText value="msg.item" /> </rich:column> <rich:column rowspan="2"> <h:outputText value="msg.department" /> </rich:column> <rich:column rowspan="2"> <h:outputText value="msg.purchaseAmount}" /> </rich:column> <rich:column rowspan="2"> <h:outputText value="msg.quantity" /> </rich:column> <rich:column colspan="5"> <h:outputText value="msg.promotions" /> </rich:column> <rich:column breakRowBefore="true"> <h:outputText value="msg.promoName" /> </rich:column> <rich:column> <h:outputText value="msg.promoCode" /> </rich:column> <rich:column> <h:outputText value="msg.promoCategory" /> </rich:column> <rich:column> <h:outputText value="msg.discount" /> </rich:column> <rich:column> <h:outputText value="msg.points" /> </rich:column> </rich:columnGroup> </f:facet> </rich:dataTable> 
0
jsf richfaces
source share
1 answer

I use <rich:column rowspan="2"> and <rich:column breakRowBefore="true"> for a similar table: Result

the code

  <f:facet name="header"> <h:outputText value="#{msg.txnLineItems}" /> <rich:columnGroup> <rich:column rowspan="2"> <h:outputText value="#{msg.item}" /> </rich:column> <rich:column rowspan="2"> <h:outputText value="#{msg.department}" /> </rich:column> <rich:column rowspan="2"> <h:outputText value="#{msg.purchaseAmount}" /> </rich:column> <rich:column rowspan="2"> <h:outputText value="#{msg.quantity}" /> </rich:column> <rich:column colspan="5"> <h:outputText value="#{msg.promotions}" /> </rich:column> <rich:column breakRowBefore="true"> <h:outputText value="#{msg.promoName}" /> </rich:column> <rich:column> <h:outputText value="#{msg.promoCode}" /> </rich:column> <rich:column> <h:outputText value="#{msg.promoCategory}" /> </rich:column> <rich:column> <h:outputText value="#{msg.discount}" /> </rich:column> <rich:column> <h:outputText value="#{msg.points}" /> </rich:column> </rich:columnGroup> </f:facet> 
0
source share

All Articles