@Override
    public int getChildCount() {
        if (isLeaf()) {
            return 0;
        }

        lazyLoad();

        return super.getChildCount();
    }
Lazy version of the {@link DefaultTreeNode}.
A lazy version of the {@link CheckboxTreeNode} is still missing.

@param <T> T the data type
primefaces/src/main/java/org/primefaces/model/LazyDefaultTreeNode.java