Copy link to clipboard
Copied
I'm rather new to flash builder, as I am editing an app that was contracted made offshore. I have added a new service but my listener never hits, I used fiddler to see that it successful querys the webservice but the success (or failure) events never fire.
protected function view1_viewActivateHandler(event:ViewNavigatorEvent):void
{
var serviceManager:Refer_EarnServiceManager = new Refer_EarnServiceManager();
serviceManager.addEventListener(Refer_EarnWebServiceEvent.RECOMMENDED_BUSINESS_SERVICE,onRecommendedBusinessSuccess);
serviceManager.addEventListener(FaultEvent.FAULT,onRecommendedBusinessFail);
serviceManager.getRecommendedBusinesses( BusinessVO(data).intBusinessID); // BusinessVO(data).intBusinessID
showBusy();
}
private function onRecommendedBusinessSuccess(event:Refer_EarnWebServiceEvent):void
{
hideBusy();
//AppModel.getInstance().recommendedbusinessList = event.result
var arrcol:ArrayCollection = Refer_EarnWebServiceParser.parseRecommendedBusinessResult(event.result);
appModel.recommendedbusinessList = arrcol;
if(arrcol.length>1)
{
// navigator.pushView(Refer_EarnChooseBusiness2,arrcol);
hideBusy();
}
else
{
// navigator.pushView(Refer_EarnMainView,arrcol[0] as BusinessVO);
hideBusy();
}
}
Found the answer: There was a "dispatch" function that I missed.
case ApplicationConstants.WEB_SERVICE_RECOMMENDED_BUSINESS: { dispatchEvent(new Refer_EarnWebServiceEvent(Refer_EarnWebServiceEvent.RECOMMENDED_BUSINESS_SERVICE,xmlObj)); break; }
Copy link to clipboard
Copied
Found the answer: There was a "dispatch" function that I missed.
case ApplicationConstants.WEB_SERVICE_RECOMMENDED_BUSINESS: { dispatchEvent(new Refer_EarnWebServiceEvent(Refer_EarnWebServiceEvent.RECOMMENDED_BUSINESS_SERVICE,xmlObj)); break; }