CFINVOKE
I need some clarification about using cfinvoke to call
a function within a component.
I created a component using CFCOMPONENT in a .cfc and inside this component I have a few CFFUNCTIONs.
I'm calling a function from my calling page using cfinvoke
But in my calling page I'm using a loop. My goal is to call that function everytime a record is looping.
So on my calling page I have something like:
<cfquery name="x" datasource ="#mydsn#">
select * from myemp
</cfquery>
<!--- some emp may have more than 1 title --->
<cfset count = 1>
<cfset arr_x = arraynew(1>
<cfloop query="x">
<cfset arr_x[#count#] = "#FN# | #LN# | #MN# | #Title#">
<cfset count = #count + 1>
<cfinvoke component="cfcomponents.mycomp" method="MyMethod" id = "#empId#">
</cfloop>
<cflocation url="someothertemplate.cfm">
What I'm not too clear is:
When I use cf invoke to call MyMethod on each loop, eventhough I did not expect cffunction to return something to the calling page, after MyMethod do what it needs to do, CF will always go back to the calling page for the next record to call MyMethod again until the last record, then once all the record in the query is done looping and done calling MyMethod, CF will process the next tag which is in this case cflocation, am I right?
