This is exactly what I am after. In Java I am returning 1 if successful and throwing an exception if not successful; In flex it always comes back to onResult, even when it is the exception... I want to catch the exception in my onFault.
--- In [email protected], "Andrew Spaulding" <[EMAIL PROTECTED]> wrote: > How are you handling the faults in your Java backend? If we have a > fault we would generally throw an exception, and the string that goes > with the exception appears back in the RemoteObject event as > event.fault.description > > Is that what you're after? > > Andrew > www.flexdaddy.com > > > --- In [email protected], "Kent Henneuse" <[EMAIL PROTECTED]> wrote: > > The only thing I can think of off hand is that you for got to put a > "fault=" > > in your <mx:RemoteObject> or you might have put it in as onFault > > > > I put this in my onFault so that I can at least see what the error > is on the > > client side while debugging: > > > > public function onFault( event : Object ) : Void > > { > > mx.controls.Alert.show(event.fault.faultstring, 'Error'); > > } > > > > I also took a quick look at the book and I see that on Pages 463 and 464 > > they are missing the fault piece. Depending on how you are coding > it would > > look like this: > > fault="event.call.faultHandler( event )" > > or this > > fault="event.call.faultHandler( event.result )" > > > > > > -Kent > > > > -----Original Message----- > > From: [email protected] [mailto:[EMAIL PROTECTED] On > > Behalf Of Libby > > Sent: Thursday, June 09, 2005 1:08 PM > > To: [email protected] > > Subject: [flexcoders] Re: Question for the RIA Book Guys (or anyone > with a > > Java back end for that matt > > > > I am very sorry, I got your name wrong. It is not Stephen, > > but Steven! I hate it when people misspell my name : ( > > > > --- In [email protected], "Libby" <[EMAIL PROTECTED]> wrote: > > > Hi, Stephen, et al > > > > > > I have implemented your business delegate scenario as outlined in the > > > book in chapter 20. It works very well, except for when java throws an > > > exception, the onFault never catches it. In network Monitor, I can see > > > that an onStatus, probably System.onStatus, is invoked. I coded my > > > delegate classe exactly as you have on page 479, and the onResult > > > works fine. Can you give me any pointers to "make" the onFault catch > > > the exception so I can handle it? > > > > > > Thanks, > > > Libby > > > > > > > > > > > > > > Yahoo! Groups Links Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

