View Full Version : Filtered Tree - Where are filtered items held?
25 Aug 2009, 3:38 PM
I have filtered a Tree but I would like to know where the list of filtered items is held.
In the TreeStore I can still see all my ModelData items but I cannot see anywhere that holds the list of filtered ModelData items.
Perhaps there is no where the filter items are stored, but if so, how is it determined what filtered items to display on screen?
Can anybody point me in the right direction?
26 Aug 2009, 5:34 AM
if you look in the java code of TreeStore then you see that this method gives you the filtered children:
26 Aug 2009, 6:07 AM
Ok, thanks. I see how it does it now.
It doesnt give me exactly what I need though. For a TreeGrid it returns the parent of the filtered child and all the children that are at the same level as it.
What i'm really looking for is to return jsut one result.....the child I have filtered.
I think I might need to override some of the methods in TreeGrid to acheive this.
26 Aug 2009, 6:31 AM
in a Store.java you have this:
protected List<M> filtered;
to get this you need to subclass your treestore to get this value.
EDIT: sorry. i see the Store#applyFilter overwrite this Store#applyFilter and you dont have a already filtered list like in store.
but you can call the method getAllItems and then check with this Store method if the item is filtered:
protected boolean isFiltered(ModelData record, String property)
Powered by vBulletin® Version 4.1.5 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.