public boolean isLeaf() {
    TreeRowKey rowKey = (TreeRowKey) getRowKey();
    T treeNode = locateTreeNode(rowKey);
    if (treeNode != null && !nodeAdaptor.isLeaf(treeNode)) {
      return false;
    }

    treeNode = treeDataModel.locateTreeNode(rowKey);
    if (treeNode != null) {
      return nodeAdaptor.isLeaf(treeNode);
    }

    return false;
  }
  public void walk(
      FacesContext context,
      final DataVisitor dataVisitor,
      Range range,
      Object rowKey,
      Object argument,
      boolean last)
      throws IOException {

    T cachedTreeNode = locateTreeNode((TreeRowKey) rowKey);
    T treeNode = treeDataModel.locateTreeNode((TreeRowKey) rowKey);

    if (treeNode != null) {
      if (cachedTreeNode == null
          || (nodeAdaptor.isLeaf(cachedTreeNode) && !nodeAdaptor.isLeaf(treeNode))) {
        // fill cache
        treeDataModel.walk(context, new CacheFillingVisitor(), range, rowKey, argument, last);
      }

      super.walk(context, dataVisitor, range, rowKey, argument, last);
    }
  }