Hi, We are using commands. The command has access to this when the event is broadcasted. It's the event that you get on onResult(event) and onFault(event) that doesn't have this data. event.data and event.type are undefined as well.
We thought about the global variable route. Actually we thought about having the Responder having an attribute for this as well. Problem with that though is that we have asynchronous chained commands for certain actions and there's no way to know which data is relevant to which command any any point in time. george --- In [email protected], "Dimitrios Gianninas" <[EMAIL PROTECTED]> wrote: > > Hi, > > The simplest solution is to implement commands :) > > However, if you want to keep what you have, you will have to save the > original event object in some global variable so that you can look it up > once onResult() or onFault() are fired. > > Dimitrios "Jimmy" Gianninas > RIA Developer > Optimal Payments Inc. > > > ________________________________ > > From: [email protected] [mailto:[EMAIL PROTECTED] On > Behalf Of george_lui > Sent: Friday, January 06, 2006 9:37 PM > To: [email protected] > Subject: [flexcoders] Need help in tackling this event problem... > > > Hi, > > Here's my scenerio: > > I have a view and it's corresponding ViewHelper. There are two > buttons in the view. If I hit button A, I want action X to occur. If > I hit button B, I want action Y to occur. > > This is how I broadcast my event in this view when I hit these buttons. > > CommandEventBroadcaster.getInstance().broadcastEvent(SharkfinControl.EVE > NT_SAVE_FORM, > {form: true}, this); > > We have a custom EventBroadcaster that we wrote to include the > Responder object (the 'this' argument). It's also passing in a boolean > flag here (form). In our case the ViewHelper > implements the Responder interface. This is for the purpose > decoupling the command from the Responder (ViewHelper). In our > Responder we have the onFault(event) and onResult(event) methods in > which we do post-command-execution stuff. > > The problem it seems for me is that I want to have some sort of flag > that would distinguish between executing action X or Y (the form > boolean). I can set a flag when broadcasting the event. The command > class has access to these flag in the event. However, on onResult() > the intiall event parameters is lost. It appears to be a new event > object. Therefore, the responder onFault(event) and onResult(event) > have no notion of any flags that were set before the service call. > > Is there a solution that you might know of to address this? The basic > gist of my problem is to retrieve any event attr in onResult() and > onFault() that were sent on the event when it was intially broadcasted. > > TIA, > George > > > > > > > > -- > Flexcoders Mailing List > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > Search Archives: > http://www.mail-archive.com/flexcoders%40yahoogroups.com > > > > ________________________________ > > YAHOO! GROUPS LINKS > > > > * Visit your group "flexcoders > <http://groups.yahoo.com/group/flexcoders> " on the web. > > * To unsubscribe from this group, send an email to: > [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of > Service <http://docs.yahoo.com/info/terms/> . > > > ________________________________ > -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 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/

