1 Reply Latest reply on Mar 17, 2009 8:07 AM by manik

    Best practice to establish if a node has children


      We're wondering what the best practise to establish if a node has children is.

      "Node" doesn't appear to have anything to directly to this (a hasChildren() method for example), and the closest thing we've found is getChildrenNames(), which is relatively slow.

      "NodeSPI" has a "hasChildrenDirect()" method, which is exactly the kind of thing we're after, and all the current implementations I could see of "Node" currently implement NodeSPI, but I see from the docs that it's quite clear we shouldn't be using the NodeSPI interface.

      So I was wondering if there is a recommended way to do this, or if there were any plans to add a hasChildren() method to the Node interface, or whether I should submit a feature request.