Hi,
Thanks for your answer, but i already work with my own
model/state/walker/node implementations except for model that extends
TreeModelBase, and that's the problem.
I post the solution if someone have the same problem.
In fact UITreeData save and restore the treestate between page.
So when i replace the old Model with the new empty one , the
UITreeData restore the old treestate.
And my treestate have a reference to his tree model. So i have an
old treeState with old data on a new model.
so i have override this method in MyTreeModel :
public void setTreeState(TreeState treeState) {
super.setTreeState(treeState);
if (treeState instanceof MyTreeState) {
MyTreeState state = (MyTreeState) treeState;
state.setModel(this);
}
}
And that's work.
-----Message d'origine-----
De : Aleksei Valikov
Envoyé : jeudi 7 septembre 2006 17:08
À : MyFaces Discussion
Objet : Re: bug ? infinite loop in tree2 ?
Hi.
> If i remove my custom "isNodeExpanded" and expand all nodes with
> "toggleExpanded", i have got an output that say the same thing at the
> same moment.
>
>
> How can I avoid this ?
> Is this a bug from tree 2 ?
I can't say about this problem exactly but I've suffered from a lot of
problems with tree2 TreeModel and finally end up with my own tree
model/state/walker/node implementations. If you use maven, you can build it
from the hifaces.dev.java.net core module. (no release yet).
Bye.
/lexi