Using Flash Remoting Update
11
The CFC contains two functions:
logoutuser
and
getData
. The
getData
function
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>
Data translation
The following table lists the ColdFusion data types and the corresponding ActionScript data
type:
TIP
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.
ColdFusion data type
Flash data type
String
String
Array
[] = Array
Struct
{} = untyped Object
Query
Array of untyped Objects
CFC
Class = typed Object (if a matching ActionScript class
exists, otherwise the CFC becomes a generic untyped
Object (map) in ActionScript)
CFC Date
ActionScript Date
CFC String
ActionScript String
CFC Numeric
ActionScript Numeric
ColdFusion XML Object
ActionScript XML Object
Содержание COLDFUSION MX 7.0.2-USING COLDFUSION MX WITH FLEX...
Страница 1: ...Using ColdFusion MX with Flex 2...
Страница 12: ...12 Using Flash Remoting Update...
Страница 24: ...24 Using the Flex Messaging Event Gateway...
Страница 71: ...Example application 71 wait png The wait png file appears as follows...
Страница 72: ...72 Using the Flex Data Service Assembler...