Saturday, March 27, 2010

Create CFCs entirely in - "generate script style code"

Maybe one of the coolest new features in CF9 is the ability to create entire CFC's using a <cfscript> style syntax. And, the CFBuilder will help you build the structure of the code when you check the box labeled "generate script style code."

Learn more from Budd Wright.

Here is an example of the basic structure:

component  displayname="jhjh" hint="Sample Utitility" output="false"
{
 property name="x" type="any";

 public any function getX()
 {
  return x;
 }

 public void function setX( required any x )
 {
  x = arguments.x;
 }

 public  function Hello World()
 {

 }

}

No comments:

Post a Comment