Triple related select
I read Raymond Camden's blog post about triple related selects and I'm trying to implement a solution of my own. I can only get the first dropdown to populate and am getting three bind errors "Bind Failed, element not found: SelState ..." for the first two and then "Bind Failed, element not found: SelDestination ... " for the last.
My code looks accurate (to me anyway) but clearly its not working.
Can someone please help me debug this?
<cfform name="Localiza">
<table>
<tr>
<td width="100">State:</td>
<td width="150">
<cfselect name="SelState" bind="cfc:_fc_cfc_triple.GetState()"
display="misc_state" value="misc_state" BindOnLoad="true"/></td></tr>
<tr>
<td width="100">County:</td>
<td width="150">
<cfselect name="SelCounty" bind="cfc:_fc_cfc_triple.GetCounty({SelState})"
display="destination_county" value="destination_county" BindOnLoad="false"/></td></tr>
<tr>
<td width="100">Destination:</td>
<td width="150">
<cfselect name="SelDestination" bind="cfc:_fc_cfc_triple.GetDestination({SelState},{SelDestination})"
display="destination_name" value="destination_id" BindOnLoad="false"/></td></tr>
</table>
</cfform>
The form is above, the cfc (_fc_cfc_triple.cfc) is below
<cfcomponent>
<cffunction name="GetState" access="remote" returnType="query">
<cfquery name="LstState" datasource="mydsn">
SELECT misc_state
FROM states_misc
ORDER BY misc_state ASC
</cfquery>
<cfreturn LstState>
</cffunction>
<cffunction name="GetCounty" access="remote" returnType="query">
<cfargument name="misc_state" type="any" required="true">
<cfif #ARGUMENTS.misc_state# EQ "">
<cfset LstCounty="">
<cfelse>
<cfquery name="LstCounty" datasource="mydsn">
SELECT DISTINCT destination_county
FROM destinations
WHERE destination_state = #ARGUMENTS.misc_state#
ORDER BY destination_county ASC
</cfquery>
</cfif>
<cfreturn LstCounty>
</cffunction>
<cffunction name="GetDestination" access="remote" returnType="query">
<cfargument name="misc_state" type="any" required="true">
<cfargument name="destination_county" type="any" required="true">
<cfif #ARGUMENTS.misc_state# EQ "" OR #ARGUMENTS.destination_county# EQ "">
<cfset LstDestination="">
<cfelse>
<cfquery name="LstDestination" datasource="mydsn">
SELECT destination_id,destination_name
FROM destinations
WHERE destination_state = #ARGUMENTS.misc_state#
AND destination_county = #ARGUMENTS.destination_county#
ORDER BY destination_name ASC
</cfquery>
</cfif>
<cfreturn LstDestination>
</cffunction>
</cfcomponent>
