title: JSF RichTable merging rows / columns in a header
body: <p>What I want to do is do this layout with <code>RichTable</code> in its header to have 3 columns:</p>
  <pre><code>+---+---+-------+
  |   |   | 3   5 |
  | 1 | 2 |-------+
  |   |   | 4   6 |
  +---+---+-------+
  </code></pre>
  <p>I got used <a href="http://docs.jboss.org/richfaces/4.0.X/4.0.0.Alpha2/en-US/Component_Reference/html/chap-Component_Reference-Tables_and_grids.html" rel="nofollow noreferrer">this</a> (8.2) resource to get it done. <strong>Rich-faces 4.0.0</strong></p>
  <p>But instead I end up having plain table-row with no any merging.</p>
  <p>Could you please shed a light on this?</p>
  <p><strong>Update:</strong></p>
  <p>About the answer from <strong>Vasil Lukach</strong>. In my case (if I do copy paste of those code), I have this result (I use hard coded values to keep it simple):</p>
  <p><img src="https://i.stack.imgur.com/fxfXU.png" alt="as we can see.. it is a mess" /></p>
  <p>My code looks like this:</p>
  <pre><code> &lt;rich:dataTable id=&quot;mydatatable&quot;
                                      value=&quot;#{applicationListBean.data}&quot; &gt;
  
                      &lt;f:facet name=&quot;header&quot;&gt;
                          &lt;h:outputText value=&quot;msg.txnLineItems&quot; /&gt;
                          &lt;rich:columnGroup&gt;
                              &lt;rich:column rowspan=&quot;2&quot;&gt;
                                  &lt;h:outputText value=&quot;msg.item&quot; /&gt;
                              &lt;/rich:column&gt;
                              &lt;rich:column rowspan=&quot;2&quot;&gt;
                                  &lt;h:outputText value=&quot;msg.department&quot; /&gt;
                              &lt;/rich:column&gt;
                              &lt;rich:column rowspan=&quot;2&quot;&gt;
                                  &lt;h:outputText value=&quot;msg.purchaseAmount}&quot; /&gt;
                              &lt;/rich:column&gt;
                              &lt;rich:column rowspan=&quot;2&quot;&gt;
                                  &lt;h:outputText value=&quot;msg.quantity&quot; /&gt;
                              &lt;/rich:column&gt;
                              &lt;rich:column colspan=&quot;5&quot;&gt;
                                  &lt;h:outputText value=&quot;msg.promotions&quot; /&gt;
                              &lt;/rich:column&gt;
  
                              &lt;rich:column breakRowBefore=&quot;true&quot;&gt;
                                  &lt;h:outputText value=&quot;msg.promoName&quot; /&gt;
                              &lt;/rich:column&gt;
                              &lt;rich:column&gt;
                                  &lt;h:outputText value=&quot;msg.promoCode&quot; /&gt;
                              &lt;/rich:column&gt;
                              &lt;rich:column&gt;
                                  &lt;h:outputText value=&quot;msg.promoCategory&quot; /&gt;
                              &lt;/rich:column&gt;
                              &lt;rich:column&gt;
                                  &lt;h:outputText value=&quot;msg.discount&quot; /&gt;
                              &lt;/rich:column&gt;
                              &lt;rich:column&gt;
                                  &lt;h:outputText value=&quot;msg.points&quot; /&gt;
                              &lt;/rich:column&gt;
                          &lt;/rich:columnGroup&gt;
                      &lt;/f:facet&gt;
  
                  &lt;/rich:dataTable&gt;
  </code></pre>