*/
public void render(Renderer renderer, StringOutput target, Component source, URLBuilder ubu, Translator translator,
RenderResult renderResult, String[] args) {
SelectionTree tree = (SelectionTree) source;
Translator internalTranslator = tree.getTranslator();
TreeNode root = tree.getTreeModel().getRootNode();
target.append(tree.isMultiselect() ? SCRIPT_MULTI_PRE : SCRIPT_SINGLE_PRE);
target.append(translator.translate("alert"));
target.append(SCRIPT_POST);
target.append("<div class=\"b_selectiontree\"><form method=\"post\" name=\"seltree\" action=\"");
boolean iframePostEnabled = renderer.getGlobalSettings().getAjaxFlags().isIframePostEnabled();
ubu.buildURI(target, null, null, iframePostEnabled? AJAXFlags.MODE_TOBGIFRAME : AJAXFlags.MODE_NORMAL);
target.append("\"");
if (iframePostEnabled) {
ubu.appendTarget(target);
}
target.append(" id=\"").append(FormRenderer.JSFORMID).append(tree.hashCode()).append("\"");
target.append(">");
// append root node
renderRootNode(root, target);
boolean atLeastOneIsAccessible = atLeastOneIsAccessible(root);
if (root.getChildCount() != 0) {
renderChildNodes(root, "", tree.hashCode(), tree.isMultiselect(), tree.getGreyOutNonSelectableEntries(), tree.isShowAltTextAsHoverOnTitle(), target);
if (tree.isMultiselect() && atLeastOneIsAccessible) {
target.append("<div class=\"b_togglecheck\"><a href=\"javascript:checkall(true);setFormDirty('").append(FormRenderer.JSFORMID).append(tree.hashCode()).append("');\">");
target.append("<input type=\"checkbox\" checked=\"checked\" disabled=\"disabled\" />");
target.append(translator.translate("checkall"));
target.append("</a> <a href=\"javascript:checkall(false);setFormDirty('").append(FormRenderer.JSFORMID).append(tree.hashCode()).append("\');\">");
target.append("<input type=\"checkbox\" disabled=\"disabled\" />");
target.append(translator.translate("uncheckall"));
target.append("</a></div>");
}
}
else target.append(internalTranslator.translate("selectiontree.noentries"));
target.append("<br /><br />");
if (atLeastOneIsAccessible) {
target.append("<button type=\"submit\" class=\"b_button\" name=\"" + Form.SUBMIT_IDENTIFICATION + "\" value=\"");
target.append(StringEscapeUtils.escapeHtml(translator.translate(tree.getFormButtonKey())));
if (!tree.isAllowEmptySelection()) {