}
public void encodeBody(RendererState state) throws IOException {
FacesContext context = state.getContext();
ResponseWriter writer = context.getResponseWriter();
UIDataTableBase table = state.getRow();
String clientId = table.getClientId(context);
String tableBodyId = clientId + ":b";
EncoderVariance encoderVariance = state.getEncoderVariance();
encoderVariance.encodeStartUpdate(context, tableBodyId);
writer.startElement(HtmlConstants.DIV_ELEM, table);
writer.writeAttribute(HtmlConstants.ID_ATTRIBUTE, tableBodyId, null);
writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-edt-b", null);
if (table.getRowCount() == 0) {
UIComponent facet = table.getFacet("noData");
writer.startElement(HtmlConstants.DIV_ELEM, table);
writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-edt-ndt", null);
if (facet != null && facet.isRendered()) {
facet.encodeAll(context);
} else {
Object noDataLabel = table.getAttributes().get("noDataLabel");
if (noDataLabel != null) {
writer.writeText(noDataLabel, "noDataLabel");
}
}
writer.endElement(HtmlConstants.DIV_ELEM);
} else {
table.getAttributes().put("clientFirst", 0);
writer.startElement(HtmlConstants.DIV_ELEM, table);
writer.startElement(HtmlConstants.DIV_ELEM, table);
writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-edt-spcr", null);
writer.endElement(HtmlConstants.DIV_ELEM);
writer.startElement(HtmlConstants.TABLE_ELEMENT, table);