MACROMEDIA COLDFUSION MX 7.0.2-USING COLDFUSION MX WITH FLEX 2 Use Manual page 64

Table of Contents

Advertisement

private function resultHandler(event:ResultEvent):void
{
Hourglass.remove();
if (event.token.kind == "create")
{
dg.selectedIndex = contacts.length - 1;
}
else if (event.token.kind == "delete" && contacts.length>0)
{
var index:int = event.token.index < contacts.length ?
event.token.index : contacts.length -1;
dg.selectedIndex = index;
contact = contacts[index];
}
else if (event.token.kind == "fill" && contacts.length>0)
{
dg.selectedIndex = 0;
contact = contacts[0];
}
}
private function faultHandler(event:DataServiceFaultEvent):void
{
Hourglass.remove();
Alert.show(event.fault.faultstring, "Error");
if (event.item != null)
{
ds.revertChanges(event.item as IManaged);
dg.selectedItem = event.item;
contact = event.item as Contact;
}
}
private function conflictHandler(event:DataConflictEvent):void
{
Hourglass.remove();
var conflicts:Conflicts = ds.conflicts;
var c:Conflict;
for (var i:int=0; i<conflicts.length; i++)
{
c = Conflict(conflicts.getItemAt(i));
Alert.show("Reverting to server value", "Conflict");
c.acceptServer();
}
ds.commit();
}
64
Using the Flex Data Service Assembler

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION MX 7.0.2-USING COLDFUSION MX WITH FLEX 2 and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Coldfusion mx

Table of Contents