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

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

kanth posted a blog post

ColdFusion Application Development by ColdFusion Programmers & Developers

ColdFusion application development is associated with the website development. With the unique features of the ColdFusion development along with the ColdFusion Makrup Language which resembles scripting components like JSP and PHP and even ASP but it bares the most resemblance to HTML syntax. The ColdFusion allows developers to develop content publishing systems, dynamic sites, ecommerce sites, self service application and much more.…See More
Jul 30
Isaac Dealey updated their profile
Jul 29
Thomas Bishop updated their profile
Jul 29
Profile IconBecky B, kanth, Jim Bossemeyer and 15 more joined ColdFusion Community
Jul 29
Dennis Matteson updated their profile
Jun 22
Ben Koshy updated their profile
May 2
Ben Arledge updated their profile
Mar 8
Santhosh Kiran Reddy shared Mark Drew's group on Facebook
Mar 1

Members

Translate this page

© 2014   Created by Nick Tong.

Badges  |  Report an Issue  |  Terms of Service