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: 39

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

Alex Kaniaru joined Mark Drew's group
Thumbnail

CFEclipse Users

For people that love using the IDE that is Eclipse with the awesome plugin of CFEclipse
Wednesday
Alex Kaniaru liked Russ Johnson's group ColdBox
Wednesday
Alex Kaniaru joined Russ Johnson's group
Thumbnail

ColdBox

Community group for the ColdBox framework.
Wednesday
Ashutosh Verma liked Raghuram Reddy Gottimukkula's blog post My Experience with Coldfusion Builder
Mar 2
Harmindra Sirohi updated their profile
Feb 18
Harmindra Sirohi posted a status
"Hello"
Feb 18
Isaac Dealey posted a discussion

PayPal Cart Integration

Hey guys,I know I haven't been on here in a little while. I'm hoping one of you will have some information on this...A client of mine asked me to integrate PayPal into their existing custom shopping cart. It's just the typical old PayFlow-style, send the browser to PayPal and then bring them back afterward. I read through all the documentation and I've got it creating the form and sending to PayPal and it all works.Now PayPal says form encryption is not required, although they also say you…See More
Jan 2
Isaac Dealey updated their profile
Jan 1

Members

Translate this page

© 2015   Created by Nick Tong.

Badges  |  Report an Issue  |  Terms of Service