if(selectionEnabled) {
writer.writeAttribute("aria-selected", String.valueOf(selected), null);
}
for(int i=0; i < columns.size(); i++) {
UIColumn column = columns.get(i);
if(column.isRendered()) {
String columnStyleClass = column.getStyleClass();
String columnStyle = column.getStyle();
int rowspan = column.getRowspan();
int colspan = column.getColspan();
writer.startElement("td", null);
writer.writeAttribute("role", "gridcell", null);
if(columnStyle != null) writer.writeAttribute("style", columnStyle, null);
if(columnStyleClass != null) writer.writeAttribute("class", columnStyleClass, null);
if(rowspan != 1) writer.writeAttribute("rowspan", rowspan, null);
if(colspan != 1) writer.writeAttribute("colspan", colspan, null);
if(i == 0) {
for(int j = 0; j < depth; j++) {
writer.startElement("span", null);
writer.writeAttribute("class", TreeTable.INDENT_CLASS, null);
writer.endElement("span");
}
writer.startElement("span", null);
writer.writeAttribute("class", icon, null);
if(treeNode.isLeaf()) {
writer.writeAttribute("style", "visibility:hidden", null);
}
writer.endElement("span");
if(checkboxSelection && (selectable || showUnselectableCheckbox)) {
if(!nativeElements)
RendererUtils.encodeCheckbox(context, selected, partialSelected, (showUnselectableCheckbox && !selectable));
else
renderNativeCheckbox(context, tt, selected, partialSelected);
}
}
column.renderChildren(context);
writer.endElement("td");
}
}