How to include rowspan information with h:dataTable
There is a well known limitation in the h:dataTable component of JSF's RI 1.2 (Mojarra) that you cannot set the rowspan attribute in any way. Recently I needed such a feature and here is what I did... Step one : First you need to make the TableRenderer (com.sun.faces.renderkit.html_basic) work with the rowspan attribute. To do this, you need to create a new renderer that extends TableRenderer and overrides the renderRow() method. Next you copy the default implementation and after the line: writer.startElement("td", column); You insert : writer.writeAttribute("rowspan", rowspan, null); Voila, you have inserted your rowspan value for the current cell. Of course it is not yet evaluated so you need to think of the best way to calculate the rowspan in your case. Before that have a look at the final code (some other fixes included) I came up with for renderRow(): TableMetaInfo info = getMetaInfo(context, table); info.newRow(); int columnIndex = 0; ...