O'Reilly logo

ColdFusion 9 Developer Tutorial by John Farrar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The directory tree

We will create a tree from the examples directory. In trees, we have "leaf nodes". The leaf nodes don't have any leaves or items after them. They are placed at the end of the path. In this case, the files will be our leaf items. Let's look at the markup page code. Here the tag sends the same information to the CFC. This time, we will use a different method that we have added to the CFC. The CFC on each request gets the information, and sends it back as a one-dimensional array:

<html> <head> <title>CFTree Example</title> </head> <body> <h2>CFTree Example</h2> <cfform name="bob"> <cftree name="dirTree" format="html"> <cftreeitem bind="cfc:objTree.getDir({cftreeitempath}, {cftreeitemvalue})"> </cftree> </cfform> </body> </html> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required