> > ITreeProvider and IDataProvider are not exactly compatible, I don't > > think we gain anything by extending the former from the latter. > I don't insist. But you do have IDataProvider wrapper over ITreeProvider in > TableTree.java :)
Yes, indeed ;). > I din't find API to control expanded state of node. Say I would like to add > a button to collapse all nodes, or I would like to save expanded state and > restore when the user returns back to this page again. AbstractTree offers expand(), collapse() and getState(). All expanded nodes are put in the tree's model. You may implement this model as you like (e.g. store ids) but ProviderSubset is a default implementation which offers detachment out-of-the-box. > Please explain how I should operate with the state of tree (what nodes are > expanded and what nodes are selected). Once I realize I will be able to > override newRowItem properly. The tree implementation does not know anything about selection, this is not part of a tree's state. If you need it, implement it by yourself - please see the examples. You can expand/collect nodes with the corresponding methods in AbstracTree and benefit from an AJAX update automatically (only the relevant branch for NestedTree or the complete Tree for TableTree). Or you control the expand state directly in the tree's model - in case of an AJAX request you have to add the tree for rendering by yourself though. Regards Sven --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org