String newIndent = indent + imgDots;
// extract directories
int childcnt = root.getChildCount();
for (int i = 0; i < childcnt; i++) {
TreeNode child = (TreeNode) root.getChildAt(i);
// BEGIN of choice div
sb.append("\n<div class=\"b_selectiontree_item\">");
// render all icons first
// indent and dots-images
sb.append(indent);
if (i < childcnt - 1) {
sb.append(imgDots_nt);
} else {
sb.append(imgDots_nl);
}
// custom icon if available
renderNodeIcon(sb, child);
sb.append("<div class=\"b_selectiontree_content\">");
// append radio or checkbox if selectable
if (child.isAccessible()) {
// render radioboxes
// StaticTextElement or CheckboxElementComponent
renderer.render(sb, checkboxes.get(child.getIdent()), args);
} else {
// node title (using css if available)
String cssClass = child.getCssClass();
if (cssClass != null) sb.append("<span class=\"").append(cssClass).append("\">");
if (!child.isAccessible()) {
sb.append("<span class=\"b_disabled\">");
sb.append(StringEscapeUtils.escapeHtml(child.getTitle()));
sb.append("</span>");
} else {
if (child.getAltText() != null) {
// sb.append("<span ");
// sb.append(" onmouseover=\"o_showEventDetails(' ', '");
// sb.append(child.getAltText());
// sb.append("');\" onmouseout=\"return nd();\" onclick=\"return nd();\">");
sb.append("<span>");
sb.append(StringEscapeUtils.escapeHtml(child.getTitle()));
sb.append("</span>");
} else {
sb.append(StringEscapeUtils.escapeHtml(child.getTitle()));
}
}
if (cssClass != null) sb.append("</span>");
}
// END of choice div