How do I find out if a selectedNode in the 'onselected' attribute of the rich:tree element is actually a leaf?