The cfoCreateObject tag is used to create an instance of an object from a class definition.
The instance is returned to the caller in the form of a ColdFusion structure, containing
a pointer to the class information and any instance variables defined by the
constructor (if defined). The returned object can then be used in subsequent calls to
cfoInvokeMethod, or can be used directly to set/get instance variables.
||A string value that defines the class namespace of the object to create. Must refer to an existing
class definition located within a mapping defined by the cfoInit libraryPath.
||A string value that defines the variable name of the resulting object. Can include a scope
such as "application" or "session", etc.
||"a" + classname
||The name of a package if the class definition is located within a package.
An optional URL of a remote server. Must be a full path.
This allows you to create remote objects and execute the methods on a remote server.
This example creates a local object named "aCustomer" from a class named "Customer".
This example creates a local object named "aSuperQuery". It also captures the content between the start and end tags and stores it in an instance variable named "generatedContent".
where shopping_cart.cartID = 100
This example creates a local object named "aCustomer" from a class named "Customer", and also sets two instance variables. Instance variables created this way are defined before calling the constructor.
<cf_cfoCreateObject class="Person.Customer" firstName="Janet" lastName="Weiss">
This example creates a remote object.
<cf_cfoCreateObject class="Forums.ForumMessage" src="http://www.cfObjects.com/">
cfObjects version 2
cfObjects version 3