-
1. Re: CFCs Returning Query with Bind from CFGrid
ilssac May 8, 2009 12:13 PM (in response to kodemonki)kodemonki wrote:
How do I just call a CFC function? I don't think this is it:
<cfset x = pip_info.getStart({pip_grid.dealer_id})>
Actually that would work just fine, just as long as you had previously defined 'pip_info' as an instance of your CFC component with either a createObject() function or a <cfinvoke...> tag. Without the extra curly brackets... I think that is a carry over from other languages syntax.
I.E. This is perfectly common CFML code"
<cfset pip_info = createObject('component','path.to.a.cfc.file')> <!--- remmeber not to include the '.cfc' part of the component file name ---> <cfset x = pip_info(pip_grid_dealer_id)> -
2. Re: CFCs Returning Query with Bind from CFGrid
kodemonki May 11, 2009 6:03 AM (in response to ilssac)Don't I need the curly brackets as I'm trying to bind to the dealer that's been clicked on? When I took the brackets out, it says that the required argument (dealer_id) was not passed in. I don't think I'm binding right.
-
3. Re: CFCs Returning Query with Bind from CFGrid
kodemonki May 11, 2009 2:35 PM (in response to ilssac)<cfset event_info = createObject("component","pip_info")>
<cfset x = event_info.getStart(my_grid.dealer_id)>Results in "dealer_id is undefined in my_grid" before the page even loads. It's trying to call that function before I click on anything, which is why I think I need help with the binding.
<cfinvoke component="pip_info" method="getStart">
<cfinvokeargument name="dealer_id" value="my_grid.dealer_id">
</cfinvoke>Results in "DEALER_ID argument passed to the getStart function is not of type numeric" even though I haven't clicked any row yet.
CFDEBUG shows that "this.container" is null or not an object for both methods, which makes me think even more that the page is trying to pass something that hasn't been defined yet.

