How To filter a HierarchicalCollectionView in flex
I have an hierarchical xml structure like this:
<employee name="AAA" group="1"..../>
<employee name="BBB" group="1"...>
<employee name="CCC" group="1".../>
</employee>
<employee name="DDD" group="0"... />
<employee name="EEE" group="0"... />
</employee>
I load the XML, and then pass the data to an hierarchicalcollectionview:
var model:XML = .... (load the data)
var hData:HierarchicalData = new HierarchicalData(model);
hCol = new HierarchicalCollectionView(hData);
Then, I use hCol as dataProvider for a custom component. That component
does not support dataDescriptor
I want to show only the items with attribute group="1". (AAA, BBB and CCC
in this example)
How can I do it? I tested with the filterFunction property but it only
filters the root node (I think) I have to filter all the XML items by that
attribute
Thanks in advance
Cristian
No comments:
Post a Comment