private static void writeContent(List<String> row, StringListResponseWriter writer, FacesContext facesContext,
int columnCount, UIComponent child) throws IOException {
if (child instanceof HtmlCommandLink) {
final HtmlOutputLabel label = new HtmlOutputLabel();
label.setValue(((HtmlCommandLink) child).getValue());
label.setRendered(child.isRendered());
label.encodeBegin(facesContext);
label.encodeEnd(facesContext);
} else if (child instanceof HtmlGraphicImage) {
writer.writeText("", "");
} else if (child instanceof HtmlPanelGroup || child instanceof HtmlOutputLink) {
final UIComponentBase uiComponent = (UIComponentBase) child;
if (uiComponent.isRendered()) {
for (UIComponent uiChildComponent : uiComponent.getChildren()) {
writeContent(row, writer, facesContext, columnCount, uiChildComponent);
}
}
postCleanUp(row, columnCount);
} else {
child.encodeBegin(facesContext);
child.encodeEnd(facesContext);
}
}