Data Translation - MACROMEDIA COLDFUSION MX 7.0.2-USING COLDFUSION MX WITH FLEX 2 Use Manual

Table of Contents

Advertisement

The CFC contains two functions:
authenticates the user against the flexadmin role and returns a string.The logoutuser function
calls the <cflogout> tag to log the user out on the server.
<cfcomponent>
<cffunction name="logoutuser" access="remote">
<cflogout>
</cffunction>
<cffunction name="getData" access="remote" roles="flexadmin">
<cfreturn "Some Secure Data!">
</cffunction>
</cfcomponent>
To make communication between the Flex application and the CFC secure, you can
specify that the AMF channel in the ColdFusion destination definiton be secure in the
WEB-INF\flex\services-config.xml file.

Data translation

The following table lists the ColdFusion data types and the corresponding ActionScript data
type:
ColdFusion data type
String
Array
Struct
Query
CFC
CFC Date
CFC String
CFC Numeric
ColdFusion XML Object
and
logoutuser
getData
Flash data type
String
[] = Array
{} = untyped Object
Array of untyped Objects
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
. The
function
getData
Using Flash Remoting Update
11

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents