-
FEATURED COMPONENTS
First time here? Check out the FAQ!
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.
Hello sbasly,
First of all you should check out an example with the OnChanging event for a textbox:
https://www.zkoss.org/zkdemo/event/onChanging_event
After that you could modify your code to filter out the model data. A similar example with listbox can be found below:
http://zkfiddle.org/sample/2un9vk5/6-search-and-filter-by-MVVM#source-2
Don't forget to add the NotifyChange for the model!
Also you could check this small talk:
http://books.zkoss.org/wiki/SmallTalks/2007/August/ZKTree_Model
Best Regards,
Darksu
Asked: 2016-01-22 18:05:07 +0800
Seen: 29 times
Last updated: Jan 26 '16
Large Tree with dynamic columns
Tree width lost after changing col width on maximized panel
MVVM tree example to show add/insert/delete/move/drag?
Error writing 'checked' on type org.zkoss.zul.Checkbox [closed]
Problem with changing MVVM tree model
zk framework: how to load zul pages from WEB-INF under directory zul