Adobe COLDFUSION 9 Manual page 1324

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Using External Resources
<cfscript>
// Create event
createEvent = StructNew();
createEvent.action = "create";
createEvent.item = newContact;
// Create update notification
updateEvent = StructNew();
updateEvent.action="update";
updateEvent.previousversion = oldContact;
updateEvent.newversion = updatedContact;
// Create delete notification
identity = StructNew();
identity["contactId"] = newId;
deleteEvent = StructNew();
deleteEvent.action = "deleteID";
deleteEvent.identity = identity;
// Send a batch notification
all = StructNew();
all.destination="cfcontact";
all.action="batch";
all.changes = ArrayNew(1);
all.changes[1] = createEvent;
all.changes[2] = updateEvent;
all.changes[3] = deleteEvent;
r = sendGatewayMessage("LCDS", all);
</cfscript>
Data translation
The following table lists the ColdFusion data types and the corresponding Adobe Flash or ActionScript data type:
ColdFusion data type
String
Array
Struct
Query
CFC
CFC Date
CFC String
CFC Numeric
ColdFusion XML Object
Flash data type
String
[] = Array
{} = untyped Object
ArrayCollection
Class = typed Object (if a matching ActionScript class exists, otherwise the CFC becomes a
generic untyped Object (map) in ActionScript)
ActionScript Date
ActionScript String
ActionScript Numeric
ActionScript XML Object
Last updated 8/5/2010
1319

Advertisement

Table of Contents
loading

Table of Contents