Question
How to pass array to cfc?
Hi,
Can anyone please help explain how to pass an array to a cfc?
I have a comma delimitered numeric string called "orderedMedia".
I create a new array:
<cfset orderArrayList=ArrayNew(1)>
I turn that string into an array:
<cfset orderArrayList = ListToArray(#orderedMedia#)>
I dump my results and can see the array just fine, but I cant figure out how to pass the array to my cfc. I just get the error message "You have attempted to dereference a scalar variable of type class coldfusion.runtime.Array as a structure with members."
Here is what I was attempted:
<cfinvoke component="cfc.media" method="orderMedia" argumentcollection="#orderArrayList#">
Any ideas please?
Cheers,
Aaron
Can anyone please help explain how to pass an array to a cfc?
I have a comma delimitered numeric string called "orderedMedia".
I create a new array:
<cfset orderArrayList=ArrayNew(1)>
I turn that string into an array:
<cfset orderArrayList = ListToArray(#orderedMedia#)>
I dump my results and can see the array just fine, but I cant figure out how to pass the array to my cfc. I just get the error message "You have attempted to dereference a scalar variable of type class coldfusion.runtime.Array as a structure with members."
Here is what I was attempted:
<cfinvoke component="cfc.media" method="orderMedia" argumentcollection="#orderArrayList#">
Any ideas please?
Cheers,
Aaron