But now I'd like to query the database to load the ArrayCollection. I know how to do that if I place HTTPService and DropDownList in the same MXML file but I don't know how to do if HTTPService is in separate file.

1 Answer
1

You need to change things around so that your ArrayCollection is a bindable property on your DpDDLCustomer Class (note that it's considered best practice to name Classes beginning with a capital letter--you might remember seeing a warning to that effect when you created the Class).

Then all you have to do is create a shared instance of that Class (automated Dependency Injection Frameworks such as Robotlegs can make this much easier, but there are other ways--post back of you need help with this) or only share the exposed ArrayCollection variable (again, one shared instance). When the Service returns the information, it populates the shared instance itself or generates an Event that tells a higher up Control component to populate the AC.

I used to have some examples online, but it seems my subdomain is down. I'll try to get to the bottom of it and post back.