If you have BlazeDS and looked at the examples, then you know how to connect to 
the backend.
 
To do in Caingorm, just read the docs: http://www.cairngormdocs.org/ 
<http://www.cairngormdocs.org/> 
 
Basically your command class will use a delegate class to call the server. The 
delegate class will use the ServiceLocator to get a reference to the 
appropriate service defined in the Services.mxml file.
 
<!-- Services.mxml -->
<cairngorm:ServiceLocator xmlns:mx="http://www.adobe.com/2006/mxml";

xmlns:cairngorm="com.adobe.cairngorm.business.*" >

<!-- SystemServices remote reference -->

<mx:RemoteObject id="systemServices" destination="systemService" 

concurrency="single"

showBusyCursor="false" />

</cairngorm:ServiceLocator>

 
<!-- Delegate -->
 
package com.optimal.bluebird.business {

import com.adobe.cairngorm.business.ServiceLocator;

/**

* @author Dimitrios Gianninas

*/

public class SystemDelegate {

private var service:Object;

private var responder:IResponder;

/**

* Default Constructor

*/

public function SystemDelegate( responder:IResponder ) {

service = ServiceLocator.getInstance().getRemoteObject( "systemServices" );

this.responder = responder;

}

/**

* Loads static lists used by the UI.

*/

public function getStaticLists():void {

var call:AsyncToken = service.getStaticLists();

call.addResponder( responder );

}

}

}

 
// Command class
 
package com.optimal.bluebird.commands.system {

public class GetStaticListsCmd  implements ICommand, IResponder {

/**

* Default Constructor

*/

public function GetStaticListsCmd() {

}

override public function execute( evt:CairngormEvent ):void {

var delegate:SystemDelegate = new SystemDelegate( this );

delegate.getStaticLists();

}

public function result( event:Object ):void {

// handle results

}

public function fault( event:Object ):void {

// handle fault

}

}

}

xxx
 
xxx
 
xxx
 
Dimitrios Gianninas
RIA Developer Team Lead
Optimal Payments Inc.
 


________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of c_higgon
Sent: Thursday, September 18, 2008 8:16 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Cairngorm - BlazeDS Example



Does any know of a good example of a Cairngorm project that uses a 
BlazeDS backend service? I am having problem delegate to connect to 
the backend server. Any help would be greatly appreciated.

~Chris



 

-- 
WARNING
-------
This electronic message and its attachments may contain confidential, 
proprietary or legally privileged information, which is solely for the use of 
the intended recipient.  No privilege or other rights are waived by any 
unintended transmission or unauthorized retransmission of this message.  If you 
are not the intended recipient of this message, or if you have received it in 
error, you should immediately stop reading this message and delete it and all 
attachments from your system.  The reading, distribution, copying or other use 
of this message or its attachments by unintended recipients is unauthorized and 
may be unlawful.  If you have received this e-mail in error, please notify the 
sender.

AVIS IMPORTANT
--------------
Ce message électronique et ses pièces jointes peuvent contenir des 
renseignements confidentiels, exclusifs ou légalement privilégiés destinés au 
seul usage du destinataire visé.  L'expéditeur original ne renonce à aucun 
privilège ou à aucun autre droit si le présent message a été transmis 
involontairement ou s'il est retransmis sans son autorisation.  Si vous n'êtes 
pas le destinataire visé du présent message ou si vous l'avez reçu par erreur, 
veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses 
pièces jointes, de votre système.  La lecture, la distribution, la copie ou 
tout autre usage du présent message ou de ses pièces jointes par des personnes 
autres que le destinataire visé ne sont pas autorisés et pourraient être 
illégaux.  Si vous avez reçu ce courrier électronique par erreur, veuillez en 
aviser l'expéditeur.

Reply via email to