Use isLeaf

git-svn-id: http://primefaces.googlecode.com/svn/primefaces/trunk@10496 5a70e874-a5cb-11dd-8af2-493fb0bb9f7c
Unified createSelectItem

git-svn-id: http://primefaces.googlecode.com/svn/primefaces/trunk@10497 5a70e874-a5cb-11dd-8af2-493fb0bb9f7c
Safer check

git-svn-id: http://primefaces.googlecode.com/svn/primefaces/trunk@10498 5a70e874-a5cb-11dd-8af2-493fb0bb9f7c