Missing a refresh call on productac after setting the filter function?
On 3/2/10, James <[email protected]> wrote: > I've done some research on this and I think I'm getting there but I can't > seem to get it working in my own app. I have two tilelists > categoriesTilelist and productsTilelist populated by two array collections > categoriesAC and productsAC which are populated from remote xml files. > > One of the attributes in both xml files/array collections is categoryid. > What I want is when a user clicks an item in the categories tilelist for > only the items within the products tilelist which have the same categoryid > value of that particular item to be displayed. > > I know I need to use a filter function for this but it doesnt seem to work. > I've made a filter function called filterFun and then made a function which > should set this filter which I've applied as the item click property of the > categoriesTilelist. Here's the code I've got for these:- > > if(product.categoryid == > categoriesTilelist.selectedItem.category.categoryid) { > return true; > } > else{ > return false; > } > } > > public function setFilterFun():void{ > productsAC.filterFunction = filterFun; > } > > That doesn't seem to do anything when I click the categories after I run the > app. Can any of you guys tell me where I'm going wrong? > >

