hi I didn't manage to sleep this night so I did a quickstart project with my issue and then... realised how stupid I've been : when refreshing the tree I loose the data about what to open/close, hence my issue.
I don't know yet the solution I'll follow, hesitating between informing the user and refreshing the whole tree as soon as data behind change or keep track of the tree state in some wrappers around my data. Time'll tell, and hopefully my brain will be faster next time :) Side node : I'm once again amazed by the flexibility of wicket. It's really able to fit anyone needs. The only "issue" with this tree, in my case, is that I find the code is a bit clumsy. First I affect the data to the nodes (using recursion), and then, when the linkTree is created, I assign some state to it according to some specific nodes I've just added (like which one will be first the first one, or to expand some nodes in order to have one pre selected), being kind of required to keep track of them in between. thanks again nono NB : I hope it doesn't seem like the mailing list is my teddy bear, even if the fact is that I spend a lot of time before asking trying to figure out by myself... 2009/4/15 Live Nono <[email protected]> > Small extra precision : using tree.getTreeState().expandAll()/collapseAll() > works fine... > > 2009/4/15 Live Nono <[email protected]> > > Hi >> >> I've another issue with the LinkTree. >> >> Up to recently, it was working all fine. I was creating the LinkTree this >> way : >> new LinkTree("tree", getTreeModel()) >> >> But then I wanted the model to be refreshed at each request. I tried with >> many refreshing models like for example new LinkTree("tree", new >> LoadableTreeModel(rootId)) or new LinkTree("tree", new PropertyModel(this, >> "TreeModel"))... >> >> However, each time, the expanding/collapsing behavior doesn't work >> anymore. When I click on the + or - nothing happens. >> >> Any help regarding what to do/where to look is highly welcomed ! >> >> thanks in advance >> nono >> > >
