Add event listeners on the call since he's a
WebService for "fault" and "result".
call.addEventListener(mx.rpc.events.FaultEvent.FAULT,
onFault);
call.addEventListener(mx.rpc.events.ResultEvent.RESULT,
onFault);
----- Original Message -----
From: Artur Kordowski
Sent: Tuesday, July 04, 2006 6:15 AM
Subject: [flexcoders] Handle result/fault from webservice call in
Cairngorm 2 I setup an new
Project in Flex 2 using Cairngorm 2 and now I'm trying to handle result/fault
coming from a webservice. I created a subclass of ServiceLocator for the
webservice. When I debug the call it works and I get data:
var call:AsyncToken
=
ServiceLocator.getInstance().getService("webservice").getData();
But now I dont know
how I can handle this result/fault. In Flex 1.5 we have do it this
way:
var call:Object=
ServiceLocator.getInstance().getService("webservice").getData();
call.resultHandler
= resultHandler(event);
call.faultHandler =
faultHandler(event);
But now it dont
work and I have no idea how to do it. I also looking on Adobe Labs but there ist
still docs for Cairngorm 0.99. So, can any one help me to solve this
problem?
Thanks,
Artur -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
YAHOO! GROUPS LINKS
|
- Re: [flexcoders] Handle result/fault from webservice call... JesterXL
- RE: [flexcoders] Handle result/fault from webservice... Stacey Mulcahy
- RE: [flexcoders] Handle result/fault from webservice... Artur Kordowski
- RE: [flexcoders] Handle result/fault from webservice... Artur Kordowski
- Re: [flexcoders] Handle result/fault from webser... Tom Chiverton
- [flexcoders] Re: Handle result/fault from we... ben.clinkinbeard
- Re: [flexcoders] Re: Handle result/fault... slangeberg
- [flexcoders] Re: Handle result/faul... ben.clinkinbeard
- Re: [flexcoders] Re: Handle res... Tom Chiverton
- [flexcoders] Re: Handle res... ben.clinkinbeard
- Re: [flexcoders] Re: Handle... Tom Chiverton