<?xml version="1.0" encoding="utf-8"?>
<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:js="library://ns.apache.org/flexjs/basic"
xmlns:local="*"
pageTitle="HelloWorld" xmlns:ns="library://ns.apache.org/flexjs/html5" initialize="init()">
<fx:Declarations>
<js:RemoteObject id="roSTime" destination="ColdFusion" source="booxotel.STime" result="roCheckTestResultHandler(event)" fault="roFaultHandler(event)"/>
</fx:Declarations>
<fx:Script>
<![CDATA[
import org.apache.flex.net.events.ResultEvent;
import org.apache.flex.net.events.FaultEvent;
import org.apache.flex.html.Alert;
private function init():void{
this.roSTime.send("getUTCDateTimeNow", []);
}
private function roCheckTestResultHandler(event:ResultEvent):void{
Alert.show("Date received " + event.data, this);
}
private function roFaultHandler(event:FaultEvent):void{
Alert.show("Fault " + event.message, this);
}
]]>
</fx:Script>
<js:valuesImpl>
<js:SimpleCSSValuesImpl />
</js:valuesImpl>
<js:initialView>
<js:View width="1200" height="800">
<js:Container width="100%" height="100%" >
<js:Label id="lbl" text="Hello World" width="200" />
</js:Container>
</js:View>
</js:initialView>
</js:Application>