No, you don't need to create a secondary argument for this. "PRODUCTID" is
in Mach-II event.

you can simply pull it from event that's first argument for any listener
methods.

<cffunction="Your2ndListenerMethod"   access="public" output="no"
returntype="any">
                  <cfargument name="event" type="MachII.framework.Event"
required="true" />

                   <!---- grab productId from event --->
                   <cfset productId = arguments.event.getArg("productId") >
</cffunction>

-p

2009/8/21 David D-V Tran <[email protected]>

>
> so I'd have to set up a secondary cfargument in the other functions...
> such as
>
> <cfarguments name='newProductID" default="#event.getArg("productID")#"
> required="no">
>
> correct?
> Thank you so much... I dind't know if it could be defined and pulled,
> and yes my returned would be request.product..
> thank you!
> Dave
>
> On Fri, Aug 21, 2009 at 2:49 PM, Peter J. Farrell<[email protected]>
> wrote:
> > Your read function would need to grab event.getArg("productId") to access
> that arg. So yes resultArgs are immediately available for use after being
> returned from your notify.
> >
> > Using "request.product" as a resultArg would put the returned data into
> the event under the arg named like event.getArg("request.product")
> >
> >
> > -----Original Message-----
> > From: David D-V Tran <[email protected]>
> >
> > Date: Fri, 21 Aug 2009 14:25:43
> > To: <[email protected]>
> > Subject: [Mach-II] Re: grabbing a value from a component from the handler
> >
> >
> >
> > OH yeah i forgot about that.  This was from some older code that I had.
> >
> > So if I did
> > <notify listener="ecommerceProduct" method="Create"
> resultarg="productID"/>
> > and then
> > <notify listener="ecommerceProduct" method="Read"
> resultarg="request.product"/>
> > right after it...
> >
> > would the READ function acknowledge the productID that is output from
> > the create function, and output the details for the newly created
> > product info?
> >
> >
> > On Fri, Aug 21, 2009 at 2:03 PM, Peter J. Farrell<[email protected]>
> wrote:
> >> Use resultArg instead on resultKey which is deprecated as noted in the
> XML config file reference page which is always the most up to date doc on
> the wiki. ResultArg puts the result in the Event under the arg name you
> supply.
> >>
> >> .Peter
> >> -----Original Message-----
> >> From: dave <[email protected]>
> >>
> >> Date: Fri, 21 Aug 2009 09:35:09
> >> To: Mach-II for CFML<[email protected]>
> >> Subject: [Mach-II] grabbing a value from a component from the handler
> >>
> >>
> >>
> >> <notify listener="ecommerceProduct" method="Create"
> >> resultKey="productID"/>
> >>
> >> Is it possible to grab the resultkey into another listener immediately
> >> following this one, in the same event?
> >> thank you!
> >> Dave
> >>
> >> >
> >>
> >
> >
> > >
> >
>
> >
>


-- 
Prashant Roy

--~--~---------~--~----~------------~-------~--~----~
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