The commit() method on the DataService return an AsyncToken which has a addResponder method that you set to "this" and then declare the result and fault handlers in your command.
 
Example:
 
public class MyCommand implements Command, IResponder {
 
  public function execute():void {
     var token:AsyncToken = ds.commit();
     token.addResponder( this );
  }
}
 
Dimitrios Gianninas
RIA Developer
Optimal Payments Inc.
 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of laidezmon
Sent: Thursday, November 02, 2006 5:41 PM
To: [email protected]
Subject: [flexcoders] Re: Cairngorm 2 with Data Management

Thanks for the reply.

Basically I already understand how to declare a result and a fault on
the dataService object when I declare it on the view .mxml file that
is instantiating it. But using Cairngorm 2.0 or 2.1 the services are
not actually called on the view that is accessing the data. The view
calls an actionscript function that creates an event, then the event
is fired, sent to the controller, the controller sends the event to
the command, a command calls a delegate which grabs an instance of
your services declaration, where you actually declare the DataManaged
service. So the problem is, if I call the DataManaged service through
that model, the actual service will have no idea how to pass back to
the command, the fault or result event.

Jeremy.

--- In [EMAIL PROTECTED]ups.com, Douglas McCarroll
<org.yahoo_primary.[EMAIL PROTECTED]> wrote:
>
> Laidezmon,
>
> I'm working on the same thing but am not much (any?) further along than
> you are.
>
> But hope to be making progress in the coming days and weeks!
>
> I'm taking the approach of getting the server-side connection set up
> first. I'm using Data Management Services and Hibernate. I've
downloaded
> the MySQL Sakila sample database, and used HibernateTools in Eclipse to
> generate a bunch of Java files, Hibernate mapping files, and the
> Hibernate config file. Now I'm trying to adapt Marcel Boucher's
> Flex/Hibernate example to connect to one table in it. I haven't
> succeeded yet, but hope to do so soon. Once I do I'd be happy to zip up
> the entire webApp and send it to you. Note that the client side isn't
> Cairngorm-based yet - that will be my next step - to renovate the
client
> to a Cairngorm architecture...
>
> Douglas
>
>
>
>
> laidezmon wrote:
> >
> > Anyone? Anyone at all?
> >
> > --- In [EMAIL PROTECTED]ups.com
> > <mailto:flexcoders%40yahoogroups.com>, "laidezmon" <laidezmon@ ..>
wrote:
> > >
> > > Are there any examples out there on using Cairngorm and cairngorm
> > > events with the MVC and such, and using Data Manager. I heard at
max,
> > > that using Cairngorm with DMS is possible, but there dont seem to be
> > > any examples of its use out there.
> > >
> > > The reason I ask is because I understand with pointing grids and
such
> > > at the model, as the dataprovider, how that works, and I understand
> > > calling an event which calls the data service indirectly, but where
> > > would the model come into play logically, when DMS is handling
so much
> > > of the work directly from the grid?
> > >
> > > So any help would be appreciated.
> > >
> >
> >
>

AVIS IMPORTANT

WARNING

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.

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.

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to