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 this will be
setReuseItems, which is consistent with the ListView method, though I
just comitted that) - should suffice.

Eelco

On 4/24/06, Steve Knight <[EMAIL PROTECTED]> wrote:
> 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?
>
> Steve
>
>
> On 4/24/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> >
>  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 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.
> > Currently, it does not do this.  How should I go about implementing it?
> Or
> > am I missing something obvious?
> >
> > Thanks.
> >
> > Steve
> >
>
>
> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
>  https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to