Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Getting Started / March 2006



Tip: Looking for answers? Try searching our database.

Not Finding My CFC

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
umuayo - 29 Mar 2006 20:37 GMT
Hello,
I created a cfc called cfcClassified and a function "getclassified" When I
call from my page it gives me the below error.

Could not find the ColdFusion Component cfcClassified.getclassified.  
Please check that the given name is correct and that the component exists.  
 
The error occurred in E:\'''''''': line 33
 
31 :   <cfinvokeargument name="sort" value="#sort#">
32 :   <cfinvokeargument name="display" value="'#display#'">
33 :   <cfinvokeargument name="AdminApproved" value="#AdminApproved#">
34 : </cfinvoke>
35 :

 
BKBK - 30 Mar 2006 09:42 GMT
Could we see your cfinvoke tag? You may have invoked the component cfcClassified/getclassified.cfc  instead of cfcClassified.cfc.
umuayo - 30 Mar 2006 16:11 GMT
This is my Invoke tag Below

<cfinvoke  component="#getclassifieds#" method="getResult"
returnvariable="srchresultqry">
 
  <cfinvokeargument name="sort" value="#sort#">
  <cfinvokeargument name="display" value="'#display#'">
  <cfinvokeargument name="AdminApprove" value="#AdminApprove#">
</cfinvoke>
Can you provide me with the directory structure of CF where I have to store
the COMPONENTS eg cfc's

Thanks
Dan Bracuk - 30 Mar 2006 18:22 GMT
Originally posted by: umuayo
This is my Invoke tag Below

<cfinvoke  component="#getclassifieds#" method="getResult"
returnvariable="srchresultqry">
 
  <cfinvokeargument name="sort" value="#sort#">
  <cfinvokeargument name="display" value="'#display#'">
  <cfinvokeargument name="AdminApprove" value="#AdminApprove#">
</cfinvoke>
Can you provide me with the directory structure of CF where I have to store
the COMPONENTS eg cfc's

Thanks

In your cfinvoke tag, make sure you get the name of your cfc file right.  When
I look at this thread, I see more than one possible name for your component.

As far as where to put it, it goes in the same directory as the page that uses
(ok for development, kind of pointless after that), or in the spot specified in
your adminstrator.  When we set it up, the only way to implement that was to
put them with the custom tags.
BKBK - 30 Mar 2006 17:31 GMT
page1.cfm
==========
<!---the file getclassifieds.cfc is in same folder as page1.cfm --->
<cfinvoke component="getclassifieds" method="getResult"
returnvariable="srchresultqry">
... etc.
</cfinvoke>

<!---the file getclassifieds.cfc is in myFolder and myFolder is in same
directory as page1.cfm --->
<cfinvoke component="myFolder.getclassifieds" method="getResult"
returnvariable="srchresultqry">
... etc.
</cfinvoke>

<!---the file getclassifieds.cfc is in myFolder1, myFolder1 is in myFolder2
and myFolder2 is in same directory as page1.cfm --->
<cfinvoke component="myFolder2.myFolder1.getclassifieds" method="getResult"
returnvariable="srchresultqry">
... etc.
</cfinvoke>

getclassifieds.cfc
==============
<cfcomponent>
<cffunction name="getResult">
</cffunction>
</cfcomponent>
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.