[Wicket-user] Changing Tree model

2006-04-24 Thread Steve Knight
I am currently using the tree component to display hierarchical data, and now I'd like to have an Edit page that allows users to edit the data that is displayed in the tree. So, after the user saves the changes the tree view is displayed again, and the changes should be reflected in the tree.

Re: [Wicket-user] Changing Tree model

2006-04-24 Thread Eelco Hillenius
setOptimizeItemRemoval to false should do the trick. Or maybe just manually removeChildren when you suspect something changed (e.g. by registring a listener). Eelco On 4/24/06, Steve Knight [EMAIL PROTECTED] wrote: I am currently using the tree component to display hierarchical data, and now

Re: [Wicket-user] Changing Tree model

2006-04-24 Thread Steve Knight
The data for the tree comes from a database. And the user may also move a node to a different part of the tree. I would like to rebuild the entire tree from the database on each page view, but I'd like it to maintain the expanded and selected states. How should I go about doing this? SteveOn

Re: [Wicket-user] Changing Tree model

2006-04-24 Thread Eelco Hillenius
That's the beauty of that Swing tree model. It should work as the selection is held in the TreeState object. So if you set OptimizeItemRemoval to false, it triggers redrawing the child components everytime, but using the current tree state. So, just setting that flag - btw the new method name for