Skip to main content
Participant
December 17, 2009
Question

Bind in a CFSELECT not working.

  • December 17, 2009
  • 1 reply
  • 2224 views

I've been trying to figure this problem out for a while not and I am completely stumped.

I have a CFSELECT with a BIND.

<cfselect style="width:180px;"

                                    id="idShirtSize"

                                    onChange="Change_divText(this,document.getElementById('idSizeTag'));"

                                    name="naShirtSize"

                                    required="yes"

                                    bind="cfc:CFC.evilletees.getSizes({naShirtColor})"

                                    bindonload="true"

                                    onFocus="document.getElementById('idContinue').disabled=true;">

*Note:  This exact code is running on my live server with no problem.  Unfortunately I don't have access to my hosting service's Coldfusion Administrator to go over the settings.

On my server I am running Apache 2.2 and Coldfusion 9 developer edition.

my web root is:  D:\WebDesignServer\Apache2.2\htdocs

evilletees.cfc is located in: D:\WebDesignServer\Apache2.2\htdocs\CFC

Not that I think it matters but there is also a mapping set is Coldfusion Administrator /myCFC -> D:\WebDesignServer\Apache2.2\htdocs\CFC.  I've tried changing "cfc:CFC.evilletees..." to "cfc:myCFC.evilletees..." with no luck. 

I keep getting the same error:

The specified CFC CFC.evilletees 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.

I've tried completely changing the permissions on the {webroot}/CFC to EVERYONE:Full Control.  No luck.  I've searched through Coldfusion Administrator looking for some setting that might be related other then Mappings.  I've dredged through the livedocs looking for some sort of help but all I could come up with was a note in Binding Data for Form Fields: 

Note: The component path cannot use a mapping. The componentPath value must be a dot-delimited path from the web root or the directory that contains the current page. 

My component seems to be right CFC is right off of my web root and it's dot delimited.

Can anyone give me some idea as to why this isn't working?  Am I missing a setting in CF Administrator? 

Thanks.

-Craig

    This topic has been closed for replies.

    1 reply

    Inspiring
    December 17, 2009

    Not that I think it matters but there is also a mapping set is Coldfusion Administrator /myCFC -> D:\WebDesignServer\Apache2.2\htdocs\CFC.  I've tried changing "cfc:CFC.evilletees..." to "cfc:myCFC.evilletees..." with no luck.

    You should not give "CFC:" while creating the mappings in the ColdFusion Administrator.

    Just try creating your mapping as "CFC.evilletees" and map it to your actual CFC path.

    Albion1Author
    Participant
    December 18, 2009

    Daverms wrote:

    You should not give "CFC:" while creating the mappings in the ColdFusion Administrator.

    Just try creating your mapping as "CFC.evilletees" and map it to your actual CFC path.

    Ok, I don't understand that at all.  I didn't use "CFC:" anywhere in CF Administrator mappings. 

    From what I understand a bind in a cfselect can accept one of the following formats: (http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec22c24-7a0a.html under "Using Bind Expressions")

    1) cfc:componentPath.function(),

    2) javascript:function(), or

    3) url:URL?parameters. 

    If I use the first option then "The componentPath

    value must be a dot-delimited path from the web root or the directory that contains the current page."  My file is /CFC/evilletees.cfc from the webroot.  I am assuming, if I am understanding the documentation correctly, that my bind should look like this bind="cfc:CFC.evilletees.function()"  That is the correct '.' delimited path from webroot so the syntax is correct. 

    From this error "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." I must assume that mappings in CF Administrator have nothing to do with thisI didn't pick that up at first which is why I mentioned it in my original post.

    If my syntax is correct, the exact same code works on Hosting.com's coldfusion server, and it has nothing to do with mappings then I've either not set something up right, or there is a setting in CF Administrator that I am missing.  That's what I am wondering.