Copy link to clipboard
Copied
i am trying , and not very successfully, to use bindings with cfselect.
The issue(s) i am encountering are;
" The specified CFC handicap could not be found.
The path to the CFC must be specified as a full path, or as a relative path from the current template, without the use of mappings"
the problem here is that both the calling page and the cfc are in the same directory
the code:
<cfform name="siDis" action="" method="post">
<cfselect name="hcap"
bind="cfc:handicap.getCategories()"
display="cat_dscr"
value="catid"
bindonload="yes"
/>
<cfselect name="hcap"
bind="cfc:handicap.getHandicap({catid})"
display="h_descr_dscr"
value="h_code"
/>
</cfform>
<cfcomponent displayname="handicap">
<cffunction name="getCategories" access="remote" returntype="quey">
<cfset hcat="">
<cfquery name="hcat" datasource="#dsn#">
select catid, cat_dscr
from hcap_categories
</cfquery>
<cfreturn hcat>
</cffunction>
<cffunction name="getHandicap" access="remote" returntype="query">
<cfargument name="catid" type="numeric" required="Y">
<cfset hcap="">
<cfquery name="hcap" datasource="#dsn#">
select hcode, h_descr,hcapcat
fromhandicap
where hcapcat=#arguments.catid#
</cfquery>
<cfreturn hcap>
</cffunction>
</cfcomponent>
The other issue, I am using CFWACK 9, ch 15 as an example:
both the cfc and cfm page are in the same dir , no mappings, run it after unziping files and it works beautifully, take those two files out of the ch 15 dir and they dont work????????
"colums matching the value or display attributes specified on teh cfselect tag are not present in the query"
"bind failed, element not found ratingID"
any ideas on why this is working this way?
tried various other set ups to included mappings and it wont work.
original set up was in fusebox 5.5 with cfc in model dir and cfm in display, No love there eaither.
would really love to use this in current app
TIA,
JB
Copy link to clipboard
Copied
If in a framework I think the bind will need to start at the web root.
So if the code is in:
webroot/folderA/folderB/
Try the bind as folderA.folderB.theCFC.thefunction()