Why can't I use resultArg?

23 views
Skip to first unread message

Miguel Ulloa

unread,
Oct 3, 2013, 11:56:03 AM10/3/13
to mach-ii-for...@googlegroups.com
Hello Guys,

I hope someone is still helping out. I have an old MachII app which is using the deprecated resultKey such as:
...
<notify listener="awesomeListener" method="getTheAwesome" resultKey="request.Awesome"/> 
<event-arg name="Awesome" variable="request.Awesome"/>
...

The method getTheAwesome returns an Object. I would like to do this in one step using resultArg instead, but when I do the following, I get an empty string when I cfdump  event.getArg('Awesome')
...
<notify listener="awesomeListener" method="getTheAwesome" resultArg="Awesome"/>
...
I have a work-around using event-arg, but I will one day like to update this app, and I will need to understand this issue before I tackle that.

NOTE: All the other notifies on the configuration use resultKey. We are am using machii 1.8.1.

Thanks in advance,
-Miguel

Peter J. Farrell

unread,
Oct 4, 2013, 12:21:33 PM10/4/13
to mach-ii-for...@googlegroups.com
What listen invoker your listener extend? My guess it extends one of the deprecated CFC_*.cfc invokers.  You'll want to use either:

MachII.framework.invokers.EvenArgsInvoker

or

MachII.framework.invokers.EvenInvoker

The deprecated invokers haven't been upgraded in a many years.


Miguel Ulloa said the following on 10/03/2013 10:56 AM:
--
--
For more options and to unsubscribe, visit this group at http://groups.google.com/group/mach-ii-for-coldfusion?hl=en
 
Git & Wiki: https://github.com/Mach-II/Mach-II-Framework
---
You received this message because you are subscribed to the Google Groups "Mach-II for CFML" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mach-ii-for-coldf...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


-- 
Peter J. Farrell
OpenBD Steering Committee / Mach-II Lead Developer
http://blog.maestropublishing.com
Identi.ca / Twitter: @maestrofjp

Please do not send me Microsoft Office/Apple iWork documents. Send OpenDocument instead! http://fsf.org/campaigns/opendocument/

Miguel Ulloa

unread,
Oct 7, 2013, 3:16:33 PM10/7/13
to mach-ii-for...@googlegroups.com
Thanks Peter,

Interesting, I did not know there was a way to override the default invoker.

<listeners>
<listener name="awesomeListener" type="awesomeListener">
<invoker type="MachII.framework.invokers.CFCInvoker_Event" />
</listener>
...

Thanks again,
-Miguel
To unsubscribe from this group and stop receiving emails from it, send an email to mach-ii-for-coldfusion+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
Reply all
Reply to author
Forward
0 new messages