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

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

Ben Arledge updated their profile
Mar 8
Matt Osbun and CVgeek are now friends
Feb 9
Matt Osbun updated their profile
Feb 9
Pragnesh Vaghela updated their profile
Jan 23
Profile IconBibin, Octal Info Solution, Ashley Andersen and 2 more joined ColdFusion Community
Jan 18
Bibin liked Pablo Varando's discussion What are you looking for in Free ColdFusin Hosting?
Nov 28, 2013
Sergii Galashyn updated their profile
Nov 26, 2013
Kay Smoljak updated their profile
Nov 22, 2013

Members

Translate this page

© 2014   Created by Nick Tong.

Badges  |  Report an Issue  |  Terms of Service