public void onExpandAll() {
   TreeExpansionModel expansionModel = tree.getExpansionModel();
   List<TreeNode> roots = getTreeModel().getRootnodes();
   for (TreeNode root : roots) {
      expandAll(root);
   }
}

private void expandAll(TreeNode node) {
   if (node.getHasChildren()) {
      expansionModel.markExpanded(node);
      for (TreeNode child : node.getChildren()) {
         expandAll(child); // this is a recursive call
      }
   }
}


--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-3-1-How-to-expand-all-the-tree-nodes-tp5702736p5708713.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to