Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="utf-8"?>
- <s:TitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009"
- xmlns:s="library://ns.adobe.com/flex/spark"
- xmlns:mx="library://ns.adobe.com/flex/mx" width="600" height="200"
- title="Error Message Box"
- close="titlewindow1_closeHandler(event)"
- creationComplete="{cfservice.getHost()}">
- <fx:Declarations>
- <!-- Place non-visual elements (e.g., services, value objects) here -->
- <s:RemoteObject destination="ColdFusion" source="facade.model.utility.hostUtility" id="cfservice" endpoint="http://lc.mat.state.gov/flex2gateway/" showBusyCursor="true">
- <s:method name="getHost" fault="handleFault(event)" result="handleResult(event)" />
- </s:RemoteObject>
- </fx:Declarations>
- <fx:Script>
- <![CDATA[
- import mx.controls.Alert;
- import mx.events.CloseEvent;
- import mx.managers.PopUpManager;
- import mx.rpc.events.ResultEvent;
- //Alert.show('Hello');
- var myString:String;
- protected function titlewindow1_closeHandler(event:CloseEvent):void
- {
- PopUpManager.removePopUp( this );
- }
- private function getURL(url:String):void {
- var request:URLRequest;
- request = new URLRequest(url);
- navigateToURL(request, '_self');
- }
- protected function handleFault(evt):void {
- mx.controls.Alert.show(evt.fault.faultString);
- }
- public function handleResult(evt:ResultEvent):void {
- myString:String = evt.result.toString();
- //Alert.show(myString);
- }
- ]]>
- </fx:Script>
- <!--<s:TextArea width="100%" height="65%" id="message"/>-->
- <s:VGroup x="24" y="38" width="448" height="300">
- <s:Label id="message" width="558" height="79"/>
- <mx:Button id="errBtn" label="Click to recover Session"
- click="getURL(myString);"/>
- </s:VGroup>
- </s:TitleWindow>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement