Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 662

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
}
if(cfserviceusername.text == "" && cfservicepassword.text == "")
{
Alert.show("CF Service UserName and Password are not required to test
CF server connectivity but they will be required while using the CF
services","Note");
}
service.url = CF_HTTPURL;
service.method = "POST";
service.addEventListener(ResultEvent.RESULT,httpResult);
service.addEventListener(FaultEvent.FAULT,httpFault);
service.send();
}
public function httpResult(event:ResultEvent):void
{
Alert.show("Connection with ColdFusion server Successful","Connection Status");
}
public function httpFault(event:FaultEvent):void
{
Alert.show("ColdFusion server could not be reached, Make sure credentials are
correct and CF server is running","Error");
}
private function checkCollapse(event:MouseEvent):void
{
if( event.clickCount == 2)
{
currentState = currentState == "collapsed" ? "":"collapsed";
}
}
private function rememberCredential():void
{
var data:ByteArray = new ByteArray();
data.writeUTFBytes(cfip.text);
En cryptedLocalStore.setItem('IP', data );
var data:ByteArray = new ByteArray();
data.writeUTFBytes(cfprt.text);
Encr yptedLocalStore.setItem('PORT', data );
var data:ByteArray = new ByteArray();
data.writeUTFBytes(cfcnxtrt.text);
Encrypt edLocalStore.setItem('CONTEXT', data );
var data:ByteArray = new ByteArray();
data.writeUTFBytes(cfserviceusername.text);
Encr yptedLocalStore.setItem( 'USER', data );
var data:ByteArray = new ByteArray();
data.writeUTFBytes(cfservicepassword.text);
Encrypted LocalStore.setItem('PASS', data );
}
private function retrieveCredential():void
{
try{
cfip.text = EncryptedLocalStore.getItem('IP').toString();
cfprt.text = EncryptedLocalStore.getItem('PORT').toString();
Last updated 1/20/2012
657

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents