I have an mxml form with several DropDownLists.
Those DropDownLists are loaded with an array collection in this class:
package fr.intersystemes.DataProvider
{
import fr.internity.config.urlManager;
import mx.collections.ArrayCollection;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
import mx.rpc.http.HTTPService;
public class dpDDLCustomer
{
public function dpDDLCustomer()
{
}
public function onFault(event:FaultEvent):void
{
trace(this + event.fault.toString());
}
public function serviceCustomCivil():ArrayCollection
{
var DP_CUS_CIVIL:ArrayCollection ;
DP_CUS_CIVIL = new ArrayCollection (
[{label:"Monsieur" , data:"0"},
{label:"Madame", data:"1"},
{label:"Mademoiselle", data:"2"},
{label:"Le Jeune", data:"3"}]
);
return DP_CUS_CIVIL;
}
}
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.
Could you help me?
Thanks