Creating And Using Objects; Creating Objects; Using Properties - MACROMEDIA COLDFUSION MX 61-DEVELOPING COLDFUSION MX Develop Manual

Developing coldfusion mx applications
Table of Contents

Advertisement

Each CORBA object has an interface that is defined in the CORBA Interface Definition
Language (IDL). The CORBA IDL describes the operations that can be performed on the object,
and the parameters of those operations. Clients do not have to know anything about how the
interface is implemented to make requests.
To request a service from the server, the client application gets a handle to the object from the
ORB. It uses the handle to call the methods specified by the IDL interface definition. The ORB
passes the requests to the server, which processes the requests and returns the results to the client.
For information about CORBA, see the following OMG website, which is the main web
repository for CORBA information:

Creating and using objects

You use the
cfobject
You use other ColdFusion tags, such as
and methods.
The following sections provide information about creating and using objects that applies to both
COM and CORBA objects. The examples assume a sample object named "obj", and that the
object has a property called "Property", and methods called "Method1", "Method2", and
"Method3".

Creating objects

You create, or instantiate (create a named instance of ) an object in ColdFusion with the
tag or
CreateObject
type of object you use, and are described in detail in
on page 767
and
tag to create a COM object and a
cfobject
<cfobject type="COM" action="Create" name="obj" class="sample.MyObject">
obj = CreateObject("CORBA", "d:\temp\tester.ior", "IOR", "Visibroker")
ColdFusion releases any object created by
objects, at the end of the ColdFusion page execution.

Using properties

Use standard ColdFusion statements to access properties as follows:
To set a property, use a statement or
<cfset obj.property = "somevalue">
To get a property, use a statement or
<cfset value = obj.property>
As shown in this example, you do not use parentheses on the right side of the equation to get a
property value.
www.omg.com.
tag or the
CreateObject
function. The specific attributes or parameters that you use depend on the
"Creating CORBA objects" on page
function to create a named instance of an object.
and
, to invoke the object's properties
cfset
cfoutput
"Creating and using COM objects"
777. The following examples use a
function to create a CORBA object:
CreateObject
or
cfobject
CreateObject
tag, such as the following:
cfset
tag, such as the following:
cfset
cfobject
, or returned by other

Creating and using objects

763

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION MX 61-DEVELOPING COLDFUSION MX and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Coldfusion mx

Table of Contents