ColdFusion Community

The online ColdFusion / CFML community website

I posted this question in a couple forums, but no answer in the past two days. Maybe it's just me that's to impatient. However this could be a nice test to see where (in which forum) can I start to bug people with my CF problems first. :))))

I am not a total rookie programmer and I've been programming in PHP for a couple of years, made some nice websites and I know all the basic concepts of programming (OOP, functions and so on)... but I recently started to discover CF I've been having some small problems on which I get stuck too much tome regarding how small the issues are.

I was able to make a recursive navigation menu all by myself a few days ago, but I am stuck on a stupid problem such as the following. :)

OK, I am confused... error says:

"The DATASOURCE parameter to the MakeBreadCrumb function is required but was not passed in. "

But I am passing it! Don't I? Is there another way I should be passing the needed variables (arguments)? Can anynone please help me solving this small problem?

Check out the code here (I cannot post code here on this forum as it seems):
The link to the code

Views: 23

Reply to This

Replies to This Discussion

Now being Coldfusion 9
I am using CF 8.

Did you mean I should be writing like this?

cfinvoke
component="cfdocs.Recursive Navigation.cfcomponents.navigation"
method="MakeBreadCrumb"
returnvariable="MakeBreadCrumbRet"
cfinvokeargument name="id" value="#URL.item#"
cfinvokeargument name="cnt" value="1"
cfinvokeargument name="dataSource" value="#databaseSource#"
cfinvokeargument name="dataTable" value="#sourceTable#"
/cfinvoke

Cause this is what I am doing... :(

BTW, wouldn't it be nice to be able to post code properly here?! :)
Maybe you could try posting your answers here.

I think it would be easier for both. :)
Can you post your function code that you are trying to call?
I can do it again... check here. Just give me two minutes. :)
It's on.
First off you have component when it should be cfcomponent, that may make a difference
OH your problem is here:

cfif qryItem.pe_id IS NOT 0>
cfset MakeBreadCrumb(id = qryItem.pe_id, cnt = arguments.cnt + 1)
cfelse
cfset reversedBreadCrumbArray = reverseArray(inputArray = breadCrumbArray>
/cfif

You calling the function again and not passing in datasource.
Problem solved... check it out. THANK YOU A LOT FOR DEBUGGING FOR ME. I hope will be able to give back the favor.
Haha, that's becoming so funny now. Now I am having another stupid problem, so I decided to stop with coding for today... I am too tired. I am sure tomorrow I will immediately find out where the problem is. :)

And guess what I what was I doing... first of all I was writing "component" instead of "cfcomponent" as you mentioned before and second of all I was wrapping every new function in "cfcomponent" tags. HAHAHAHAHAHAHA. I realised now, that one cfc file is one component. That also means one component in CF is the same as one class definition in some other language such as Java for instance. Why didn't I look at some cfc example before?!

So now I am going away from the computer! :) I'll continue tomorrow.

Thank you again for your help.
Exactly Ryan, as I mentioned, I haven't passed the last two with the cfargument defined arguments when I was making the recursive call. :) As said I was too tired to see what was the error report saying. If you check my print screen, you can see what I am talking about. :)
Hi Alek,

Hope you would be doing well.

I saw your code and tried locally it was fine except at one line

MakeBreadCrumb(id = qryItem.Id, cnt = arguments.cnt + 1)

where you are calling the same function but is not possing the third and fourth parameter (datasource and table name).

Even though you are calling the same function with in the function, you are reqired to pass all the paramenters.

Hope this would help you .

Let me know if, you require funrther help in this.

Regards,
Vikas Bharadwaj
vikasrx@gmail.com

RSS


Latest Activity

Profile Iconmikehenke via Twitter
#jenkins, #coldfusion, inspections - qpscanner, varscoper, syntax for @sotr cloudy w/ chance of tests session https://t.co/OmsNjakFq8
Twitter23 hours ago · Reply · Retweet
Profile IconCFOverflow via Twitter
Getting a 404 when trying to use the taffy RESTful API framework on ColdFusion 8/Windows... http://t.co/7MAmoIya8c #coldfusion #server
Twitter23 hours ago · Reply · Retweet
Profile Iconmikehenke via Twitter
setup #jenkins, #coldfusion, inspections - qpscanner, varscoper, syntax for #cfml while u get coffee, https://t.co/OmsNjakFq8 #feedback
Twitter23 hours ago · Reply · Retweet
Profile Iconten24web via Twitter
Slides from @gregmoser1 talk "slatwall beyond ecommerce" at #cfobjective http://t.co/Nocfc5r2K8 #slatwall #ten24web #coldfusion
Twitter23 hours ago · Reply · Retweet
Profile Iconxactitsolutions via Twitter
Adobe Releases Critical Security Updates for Reader, Flash Player and ColdFusion http://t.co/jzrtkM2uJV
Twitter23 hours ago · Reply · Retweet
Profile IconGeekFreelancers via Twitter
New #Job: Coldfusion SQL Expert http://t.co/Fl2Ju2SLrI
Twitter23 hours ago · Reply · Retweet
Profile Iconpelaphptutor via Twitter
Twitter23 hours ago · Reply · Retweet
Profile IconCFOverflow via Twitter
ColdFusion - DateFormat invert the date on refresh page http://t.co/7pPkSWqRVu #coldfusion
Twitter23 hours ago · Reply · Retweet

Members

Translate this page

© 2013   Created by Nick Tong.

Badges  |  Report an Issue  |  Terms of Service