String iconCollapsed = (String) getFirstNonEmptyAttribute("iconCollapsed", treeNode, tree);
if (Strings.isNullOrEmpty(iconCollapsed) && Strings.isNullOrEmpty(iconExpanded)) {
encodeIconForNodeState(context, tree, treeNode, nodeState, null);
} else {
SwitchType toggleType = TreeRendererBase.getToggleTypeOrDefault(treeNode.findTreeComponent());
if (toggleType == SwitchType.client || nodeState == TreeNodeState.collapsed) {
encodeIconForNodeState(context, tree, treeNode, TreeNodeState.collapsed, iconCollapsed);
}