In order for tree to update items your model must fire treeNodesChanged event.
-Matej On Thu, May 14, 2009 at 2:55 PM, Peter Diefenthaeler <pdief...@csc.com> wrote: > > Hi every one, > I tried the tree table example and get stuck with two problems. > How can I avoid links in the tree leavlets? > How can I update the tree on a new model. I've generated the tree > information on a database query with a search field. When I press the > search button, I expected the tree to be updated with the new model, but it > doesn't work. > > suchform.add(new AjaxButton("search") > { > private static final long serialVersionUID = 1L; > > �...@override > protected void onSubmit(AjaxRequestTarget target, Form > form) { > suchliste = new SucheDao().search(suchfeld); > log.debug("#Treffer: " + suchliste.size());; > tm = createTreeModel(suchliste); > tree.updateTree(); > target.addComponent(tree); > } > }); > > > tm = createTreeModel(suchliste); > tree = new Tree("tree", tm); > tree.setRootLess(true); > tree.getTreeState().collapseAll();); > add(tree.setOutputMarkupId(true));); > > > Wicket Version 1.3.6 > > Thanx. > > PETER DIEFENTHÄLER > CSC > > Sandstr. 7, 80335 München, Germany > CIS Payments & Integration | office: +49 89 5908 6441 | mobile: +49 172 886 > 5632 | fax: +49 89 5908 6499 | pdief...@csc.com | www.csc.com > > > CSC • This is a PRIVATE message. If you are not the intended recipient, > please delete without copying and kindly advise us by e-mail of the mistake > in delivery. NOTE: Regardless of content, this e-mail shall not operate to > bind CSC to any order or other contract unless pursuant to explicit written > agreement or government initiative expressly permitting the use of e-mail > for such purpose > • > CSC Deutschland Solutions GmbH • Registered Office: Abraham-Lincoln-Park 1, > 65189 Wiesbaden, Germany • Board of Directors: Gerhard Fercho (Chairman), > Thomas Nebe, Peter Schmidt • Chairman of the Supervisory Board: Guy Hains • > Registered in Germany: HRB 22374 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org