> Now, thinking about this, I do see some sense in a separate isLeaf() > method, that has to uphold the invariant (getChildren().size() == 0) > <==> isLeaf(), where we promise that tree2 will call getChildren() only > when we actually need the children to render them (or process them in > the next request/response cycle, in earlier phases, if they were > rendered -- their parent was expanded -- in the previous > request/response cycle).
That's basically the change that we made already. In earlier versions the renderer was checking if there were children and basing the decision to add the "navigation controls" (ie. '+/-' icons) on whether or not there were any children. We improved things so that the isLeaf method was consulted instead. This allows for the "lazy" population of your tree data. Its also what's responsible for all of the "invalid bit mask" errors we've been seeing b/c apparently users were incorrectly setting the value of leaf. > But I don't see the need for a separate > getChildrenCount() method. It's useful if you want to display node counts in your jsp (ala Outlook or any standard email program.) See the simple examples for how this is done. The key is that this functionality is not mandatory. The renderer does *not* depend on it (unlike the isLeaf method). sean

