public void encodeRow(ResponseWriter writer, FacesContext facesContext, RowHolderBase holder) throws IOException {
RowHolder rowHolder = (RowHolder) holder;
Row row = rowHolder.getRow();
AbstractDataTable dataTable = (AbstractDataTable) row;
putRowStylesIntoContext(facesContext, rowHolder);
boolean partialUpdate = rowHolder.isUpdatePartial();
boolean parentTbodyStart = rowHolder.isEncodeParentTBody();
boolean tbodyStart = parentTbodyStart;
rowHolder.setRowStart(true);
Iterator<UIComponent> components = row.columns();
int columnNumber = 0;
boolean rowBegun = false;
while (components.hasNext()) {
UIComponent child = components.next();
if (child.isRendered()) {
rowBegun = true;
if (child instanceof Row) {
boolean isSubtable = (child instanceof AbstractCollapsibleSubTable);
// new row -> close </tr>
if (rowHolder.getProcessCell() != 0) {
encodeRowEnd(writer);
if (isSubtable) {
encodeTableBodyEnd(writer);
tbodyStart = false;
if (partialUpdate) {
partialEnd(facesContext);
}
}
}
rowHolder.nextCell();
if (isSubtable && partialUpdate) {
String id = dataTable.getRelativeClientId(facesContext) + ":" + child.getId() + ":c";
partialStart(facesContext, id);
}
if (!isSubtable && !parentTbodyStart && !tbodyStart) {
encodeTableBodyStart(writer, facesContext, dataTable);
rowHolder.setRowStart(true);
tbodyStart = true;
}
child.encodeAll(facesContext);
if (!isSubtable) {
encodeRowEnd(writer);
if (!components.hasNext()) {
if (!parentTbodyStart && tbodyStart) {
encodeTableBodyEnd(writer);
tbodyStart = false;
}
}
rowHolder.setRowStart(true);
rowHolder.resetProcessCell();
}
if (isSubtable && partialUpdate) {
partialEnd(facesContext);
}
} else if (child instanceof UIColumn) {
if (!parentTbodyStart && !tbodyStart) {
if (partialUpdate) {
partialStart(facesContext, dataTable.getRelativeClientId(facesContext) + ":tb");
}
encodeTableBodyStart(writer, facesContext, dataTable);
rowHolder.setRowStart(true);
tbodyStart = true;