1 Reply Latest reply on Jul 20, 2010 10:00 AM by Flex harUI

    new ListCollectionView(ArrayCollection) problem

    -skitch- Level 1

      Hey everyone,

       

      I have a component that performs filtering on the dataprovider, but I don't want that dataprovider to be filtered elsewhere.  The component I am using is an opensource auto complete textbox, which operates by text changing the dataprovider filter.

       

      I want the data provider to be wrapped in a ListCollectionView so that the original dataprovider is never touched, but mimicked.

       

      The problem though, is that the dataprovider always comes up empty this way...  Any ideas?

       

      <components:AutoComplete
                          id="individualName"
                          dataProvider="{new ListCollectionView(individualsPM.individualsCollection)}"
                          labelField="name"
                          prompt="Please select"
                          selectedItemStyleName="underline"
                          backspaceAction="remove"
                          change="individualName.selectedItem != null ?
                              individualsPM.getIndividual(individualName.selectedItem as Individual):
                              trace('nothing')"
                          searchChange="individualsPM.createIndividual(); individualsPM.selectedIndividual.name = individualName.searchText"/>