You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Kaspar Fischer <hb...@rapsak.com> on 2009/05/13 16:12:16 UTC

Refresh a BaseTree?

I create a BaseTree like this:

   final DefaultTreeModel model = new DefaultTreeModel(...);
   IModel< new AbstractReadOnlyModel<TreeModel>()
     {
       @Override
       public TreeModel getObject()
       {
         return model;
       }
     };
   add(new BaseTree("tree", model) { /* ... */ });

When the user clicks a certain link (outside the tree), I change some  
data that affects the tree and want the tree to get recreated. How can  
I achieve this?

I tried BaseTree#updateTree() with no success. Also,  
BaseTree#setDefaultModel(new DefaultTreeModel(...)) doesn't work; the  
tree becomes empty.

Any ideas?

Thanks,
Kaspar

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org