c.setHasChildren(false);
navigator.openDiv(c);
navigator.closeDiv();
}
UITreeNode nodeFacet = tree.getNodeFacet();
Object oldAttrValue = nodeFacet.getAttributes().get("isLastElement");
Object oldAjaxRootAttrValue = nodeFacet.getAttributes().get("isAjaxUpdateRoot");
try {
nodeFacet.getAttributes().put("isLastElement", new Boolean(isLastElement));
nodeFacet.getAttributes().put("isAjaxUpdateRoot", new Boolean(floatingKey != null && floatingKey.equals(rowKey)));
ResponseWriter writer = context.getResponseWriter();
if (isLastElement && this.navigator.showLines) {
writer.startElement("p", tree);
writer.writeAttribute("class", "dr-tree-last-node-marker", null);
writer.endElement("p");
}
renderChild(context, nodeFacet);
c = new Context();
c.setClientId(nodeFacet.getClientId(context) + NamingContainer.SEPARATOR_CHAR);
c.setLast(this.isLastElement);
c.setExpanded(tree.isExpanded());
c.setRowKey(tree.getRowKey());
flag.setContext(c);
//writer.write("** after renderChild **");
//navigator.openDiv();
} finally {
if (oldAttrValue != null) {
nodeFacet.getAttributes().put("isLastElement", oldAttrValue);
} else {
nodeFacet.getAttributes().remove("isLastElement");
}
if (oldAjaxRootAttrValue != null) {
nodeFacet.getAttributes().put("isAjaxUpdateRoot", oldAjaxRootAttrValue);
} else {
nodeFacet.getAttributes().remove("isAjaxUpdateRoot");
}
}
}