Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 675

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Flex and AIR Integration in ColdFusion
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
xmlns:cf="coldfusion.service.mxml.*" creationComplete="init()">
<mx:Script>
<![CDATA[
import mx.rpc.events.ResultEvent;
import mx.rpc.events.FaultEvent;
import mx.controls.Alert;
import coldfusion.service.events.*;
public function init():void
{
poptest.execute();
}
public function handleResult(event:ResultEvent):void
{
Alert.show("Success" + event.toString());
}
public function handleError(event:FaultEvent):void
{
Alert.show("Failure");
}
public function handleGetAll(event:ResultEvent):void
{
var res:Array = event.result as Array;
for(var i:uint = 0; i < res.length; i++)
{
var key:String;
for(key in res[i])
{
trace("object key = " + key.toString());
if(res[i][key] != null)
{
}
}
}
}
]]>
</mx:Script>
<cf:Config id="configid" cfServer="localhost" cfPort="8500"
servicePassword="service" serviceUserName="service"
<!--<cf:Pop id="poptest" action="getall" result="handleGetAll(event)"
host="xx.xxx.xx.xxx" userName="failoveruser" password="password"
fault="handleError(event)"/>-->
<!--<cf:Pop id="poptest" action="getheaderonly" result="handleGetAll(event)"
host="xx.xxx.xx.xxx" userName="failoveruser" password="password"
fault="handleError(event)"/>-->
<cf:Pop id="poptest" action="delete" messageNumber="25" host="xx.xxx.xx.xxx"
userName="failoveruser" password="password" result="handleResult(event)"
fault="handleError(event)" />
</mx:Application>
trace("object value = " + res[i][key].toString());
Last updated 1/20/2012
/>
670

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents