Adobe COLDFUSION 9 Manual page 671

Developing applications
Hide thumbs Also See for COLDFUSION 9:
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.controls.Alert;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
[Bindable]
public var chaSer:Array;
public var chaDat:Array;
function init():void
{
chaDat =
[{item:"Facilities",value:"35000"},
{item:"Facilities1",value:"32000"}];
chaSer = [{type:"bar",chartdata:chaDat},
{type:"line",chartdata:chaDat}];chartest.execute();
}
function handleResult(event:ResultEvent):void
{
Alert.show("success" + event.result.toString());
}
function handleFault(event:FaultEvent):void
{
Alert.show("failure" + event.toString());
}
]]>
</mx:Script>
<cf:Config id="configid" cfServer="localhost"
cfPort="80" servicePassword="service"
serviceUserName="service" >
</cf:Config>
<cf:Chart id="chartest"
action="generate"
format="jpg"
xAxisTitle="Department"
yAxisTitle="Salary Average"
chartSeries="{chaSer}"
result="handleResult(event)"
fault="handleFault(event)"
backgroundColor = "Black"
Last updated 8/5/2010
666

Advertisement

Table of Contents
loading

Table of Contents