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

Custom list item rendering

Now we are going to take "custom" to a new level. This feature of COOP was inspired by Flex custom item renderers. Flex is a tag code framework for Flash-based applications. There is a feature of Flex where you pass in a data collection into a render list. Each item is evaluated and rendered smartly. It occurred to me that we could do the same thing with COOP. It was from this inspiration that the list render tag came into existence. Let's jump in and create a page called render.cfm and put in the following code:

<cfimport prefix="coop" taglib="/share/tags/coop"/> <coop:coop> <coop:form id="myForm"> <coop:list id="myRender_include" data="Provolone,Swiss,TOFU" renderPath="#_getSiteRootPath()#render/includes/" renderInclude="cheese"/> ...

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