Its as simple as this:

<event-handler name="something" access="public">
    <event-arg name="whereClause" value="stuff"/>
    <notify listener="coolStuff" method="doStuff" resultArg="data"/>
</event-handler>

In listener method (abbreviated code):

<cffunction name="doStuff">
    <cfargument name="event" type="MachII.framework.Event" required="true"/>

    <cfset var whereClause = arguments.event.getArg("whereClause") />

    <cfreturn getGateway().doStuff(whereClause) />
</cffunction>

Teaman said the following on 06/09/2009 06:38 PM:
> I'm now wondering if I just use the <event-arg> tag to pass it through
> the event object.  Is that the proper way to do it?
>
> Teaman
>
> On Jun 9, 4:21 pm, Teaman <[email protected]> wrote:
>   
>> I have a query in a Gateway method called getDocTypes that needs a
>> flag that modifies the query by adding a WHERE clause based on the
>> value of the flag. My Gateway is instantiated by a Listener configure
>> method. The Listener getDocTypes method calls the same method in the
>> Gateway and passes in the flag as an argument. The mach-ii.xml defines
>> the Listener involved and also the event-handler where the getDocTypes
>> method is called.  But I don't know how to pass in the flag value. I'm
>> aware of parameters placed within Listeners but the it doesn't seem to
>> be what I need here.  The event determines the flag argument value,
>> not some setting in within a Listener registration tag. All the
>> examples I see in the Mach-II wiki don't seem to address this
>> example.  I'm new so I'm still trying to figure things out.  If I
>> missed it just point me to it. else tell me here.
>>     
> >
>   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to Mach-II for CFML list.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/mach-ii-for-coldfusion?hl=en
SVN: http://greatbiztoolsllc.svn.cvsdude.com/mach-ii/
Wiki / Documentation / Tickets: 
http://greatbiztoolsllc.trac.cvsdude.com/mach-ii/
-~----------~----~----~----~------~----~------~--~---

Reply via email to