I think there is a bug in TreeRenderer encodeNode method (line 500). Following is my suggestion:
This is current code:
if (currentNode.isRoot() && !isExpanded ||
hideRootNode
&& currentNode.getNextSibling() == null
&& currentNode == treeComponentRootNode.getFirstChild()
)
{
iconImage.setAttribute(HTML.SRC_ATTR,
treeComponent.getNavOpenTopNoSiblingsImage());
}
It should be:
if (currentNode.isRoot() || hideRootNode
&& currentNode.getNextSibling() == null
&& currentNode == rootTreeNode.getFirstChild()) {
if (isExpanded)
{
iconImage.setAttribute(HTML.SRC_ATTR,
treeComponent.getNavCloseTopNoSiblingsImage());
}
else
{
iconImage.setAttribute(HTML.SRC_ATTR,
treeComponent.getNavOpenTopNoSiblingsImage());
}
}
When you set hideRootNode to "true" did you remember to take your root node and setExpanded to true?
If the root node is both hidden and not expanded then you won't get a tree rendered...