• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Event listener troubles

Community Beginner ,
Nov 25, 2013 Nov 25, 2013

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();

}

}

Views

311

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , Nov 26, 2013 Nov 26, 2013

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;                     }

Votes

Translate

Translate
Community Beginner ,
Nov 26, 2013 Nov 26, 2013

Copy link to clipboard

Copied

LATEST

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;                     }

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines