/t5/coldfusion-discussions/passing-struct-to-cfc-within-a-grid-bind/td-p/81311Oct 28, 2008
Oct 28, 2008
Copy link to clipboard
Copied
Why does the following not work? When trying to pass the
struct it gives me the error "Complex object types cannot be
converted to simple values." Can I not pass structs within binds to
a CFC? Obviously in this example i'm only passing a single numeric
value, but what I really want to do is pass a full struct that
contains a list. If there's an easier way to pass a list, that
works too!
Dan,
Thank you for the reply. I tried passing a list, but since in
CF lists are basically just comma-delimited strings, when passing
the variable the receiving CFC thinks i'm passing more than one
argument and not one object filled with commas. Maybe I just did it
the wrong way? So for example:
I have tried everything. Passing a string, a struct, an
array. I just can't seem to figure out how to pass complex
variables through a bind. Anyone have any help on this?
cf has a nice listchangedelims() function - you can change
the list
delimiter from comma to, say, | (pipe), and in your cfc
either specify
pipe as delimiter in any list functions you use or change it
back ot
comma using the same function.