To get notification of updates such as addItem,
turn off autoCommit and then call ds.commit() after each update. This returns
a token which you can use to be notified of any result or error.
Jeff
From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf
Of dreuimar
Sent: Sunday, August 27, 2006 8:39
AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Cairngorm
with DataServices - addItem() error
Hey everyone,
I'm using a hacked ServiceLocator to return DataServices in Cairngorm.
I have a command class that implements the Responder interface, and
when I go to add a new Client VO to a filled collection, I need the
onResult method called if successful. The result and fault event
handlers are tied to the async token that is returned with a fill.
Here is the dataservice:
mx:DataService id=client_hibernate destination=client.hibernate
result=event.token.resultHandler ( event )
fault=event.token.faultHandler ( event ) /
Initially grabbing clients works fine:
var call:Object = service.fill(model.clientModel.allClients,
all.clients, []);
call.resultHandler = responder.onResult;
call.faultHandler = responder.onFault;
But adding to the allClients collection throws an error because
addItem naturally returns void.
Any ideas of what I could do?
__._,_.___
--
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
Web site design development
Computer software development
Software design and development
Macromedia flex
Software development best practice
YAHOO! GROUPS LINKS
Visit your group "flexcoders" on the web.
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
__,_._,___