> BTW, I'd suggest keeping Mach II discussions on > [EMAIL PROTECTED] and leave this (CFCDev) list > for broader > CFC topics... I don't know that everyone here on CFCDev wants to read > about Mach II stuff?
I'm not subscribed to that mailing list (don't do any mach-ii stuff right now), but the mach-ii discussions on cfcdev are interesting to read. This one happens to be REALLY mach-ii specific, but most of the discussions certainly have value people using CFCs but not mach-ii (myself included), and even this one is of interest. There's little in Mach-ii that doesn't apply to designing any OO system. The Mach-ii list is there for mach-ii stuff, but I think it would be folly to chase mach-ii stuff off of this list. My $0.02. Cheers, barneyb > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Sean A Corfield > Sent: Tuesday, February 03, 2004 11:18 AM > To: [EMAIL PROTECTED] > Subject: Re: [CFCDev] mach-ii.xml and conditional logic > > On Feb 3, 2004, at 10:43 AM, Alexander Sherwood wrote: > > Right. This is what I was getting at. So its common for people to > > create a "Controller.cfc" to handle the execution and flow? > > Common, no, although some folks do it that way. You're better > off using > small building blocks and wiring it together using the XML file. > > A filter is the best fit for modifying flow control (since it gets > passed the event context as well as the current event; and it > can also > abort the current event handler by returning false). > > > <event-handler event="myEvent" access="public"> > > <notify listener="ContactManager" > > method="getContact" resultKey="request.contact" /> > > <notify listener="TemplateManager" > > method="getGetTemplate" resultKey="request.template" /> > > <announce event="{dynamicevent}" /> > > </event-handler> > > > > So, for this snippet, how would you use the two result keys > > (request.contact,request,template) in a conditional statement to > > determine what event to announce in the ANNOUNCE element. Would you > > pass the two result keys to a third CFC that would use > their values to > > determine what event to announce and use the > announceEvent() function? > > Yes. Use <event-arg> to move the two request variables into the event > object and then use a filter to process them and announce the > appropriate event. > > You could then end the handler with <announce > event="noEventConfigured"/> and have the filter abort the > event handler > if it figures out an event to announce (and letting control flow > through to the error handler otherwise). > > BTW, I'd suggest keeping Mach II discussions on > [EMAIL PROTECTED] and leave this (CFCDev) list > for broader > CFC topics... I don't know that everyone here on CFCDev wants to read > about Mach II stuff? > > Sean A Corfield -- http://www.corfield.org/blog/ > > "I have always wished that my computer would be as easy to use as my > telephone. My wish has come true - I no longer know how to use my > telephone." > -- Bjarne Stroustrup > > ---------------------------------------------------------- > You are subscribed to cfcdev. To unsubscribe, send an email > to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' > in the message of the email. > > CFCDev is run by CFCZone (www.cfczone.org) and supported > by Mindtool, Corporation (www.mindtool.com). > > An archive of the CFCDev list is available at > www.mail-archive.com/[EMAIL PROTECTED] > ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com). An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]
