I set it up so the init function calls the recursive methods
"generateSiteMap" and "generateBreadCrumbs" - those are both stored in the
variables scope of the cfc and an instance of the cfc is persisted in the
app scope. getSiteMap returns the entire site structure in a sorted tree
form ready to use a variety of places in the app and getThisBreadCrumb
returns a breadcrumb trail for a particular page. I love how that's all
working! Once they're generated and cached, they're avaiable to the app in
an instant on a simple method call.

now the only refinement would be to generate the pruned navigation for for a
particular page, and depending on the project, there are various
implementations of that. up until now i've done this with a complex series
of QofQ's for each level and nested loops, but it's not expandable to any
depth. So that's on the back burner while i finish off some of the display
templates and get ready to deploy my first OO'ish app!

Yeah!

Funny, i'm totally jazzed up about this!


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Behalf Of John Farrar
> Sent: Tuesday, December 02, 2003 4:16 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [CFCDev] recursive functions
>
>
> I know this is likely mentioned in one of the posts and I missed it... but
> why wouldn't you just create a UDF that calls itself for the recursive
> function? The udf can be run as a part of a CFC and then inside the CFC it
> would call itself... right. (Or the primary UDF would call an internal UDF
> that is self calling.)
>
> It seems like some of the suggestions are much more difficult than is
> needed.
>
> John Farrar
>
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email
> to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev'
> in the message of the email.
>
> CFCDev is run by CFCZone (www.cfczone.org) and supported
> by Mindtool, Corporation (www.mindtool.com).
>
> An archive of the CFCDev list is available at
> www.mail-archive.com/[EMAIL PROTECTED]


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to