refresh data source in Autocomplete

I am using the Autosomplete example I got from here: http://snippets.dzone.com/posts/show/5973 for Flex 3.  when the application launches it grabs the data for the autocomplete from a SQL database and builds an array collection>  this same data is used on 2 different screens.  The issue I am having is that if you launch the app and go to screen 1 and type some letters in the AC control (say you type C for example) then select a value from the list of possible matches.  Then you go to screen 2, the data only contains values that match what was typed in screen 1.  How do I tell it once I leave one of the screens that the data has to be refreshed?
LVL 6
PsychoDazeyAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

wannabetechieCommented:
Are you using same instance of the AC control in both the screens?If so is this a requirement for you.
And when the AC filterFunction is invoked does it do a filter on the Datasource itself.
If you then you may need to reset the filterFunction everytime.

0
PsychoDazeyAuthor Commented:
What do you mean by using the same instance?  I believe I am but I am a novice flex programmer so I'm not sure what you mean.  Als, how would I reset the filterFunction?
0
wannabetechieCommented:
By same instance i mean are you using the same object of AC control on both of the screens.
And you can reset the filterFunction by doing something like this

myAC.filterFunction = null or if null is not allowed create a dummy filterFunction and assign it.

myAC.filterFunction = dummy

private function dummy(item:Object):Object
{
   return item;
}
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
PsychoDazeyAuthor Commented:
Thanks wanna -
Your solution of the dummy filterFunction worked.  However for those following along; there were other issues so I ended up finding another component to use.  The autocomplete from my link above is older and not as robust as some of the others available.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Flex

From novice to tech pro — start learning today.