Filter on a Tree

asked 2016-01-22 18:05:07 +0800

sbasly gravatar image sbasly
3 1

I'm, implementing a Tree using ZK Richlet

mainTree = new Tree(); mainTreeModel = new AdvancedTreeModel((new TreeExplorerGeneratorZK(baProject, true)).getRoot()); mainTree.setItemRenderer(new TreeRenderer()); mainTree.setModel(mainTreeModel);

and that's work fine for me. right now i want to add a textBox and I wan't to make it act like a filter. when I write text on the textBox I want to disable or make invisible all the leaf that they don't contains the textBox value.

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-01-26 09:28:17 +0800

Darksu gravatar image Darksu
1991 1 4

Hello sbasly,

First of all you should check out an example with the OnChanging event for a textbox:


After that you could modify your code to filter out the model data. A similar example with listbox can be found below:


Don't forget to add the NotifyChange for the model!

Also you could check this small talk:


Best Regards,


link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

1 follower



Asked: 2016-01-22 18:05:07 +0800

Seen: 29 times

Last updated: Jan 26 '16

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More