User Guide
402 Components Dictionary
Example
The following example displays a form called reconcileForm (not shown) and calls a method
on that form object (
setReconcileData()) that allows the user to reconcile any conflicting
values returned by the server:
import mx.data.components.datasetclasses.*;
my_ds.addEventListener("resolveDelta", onResolveDelta);
function onResolveDelta(eventObj:Object) {
reconcileForm.visible = true;
reconcileForm.setReconcileData(eventObj.data);
}
// in the reconcileForm code
function setReconcileData(data:Array):Void {
var di:DeltaItem;
var ops:Array = ["property", "method"];
var cl:Array;
// change list
var msg:String;
for (var i = 0; i<data.length; i++) {
cl = data[i].getChangeList();
for (var j = 0; j<cl.length; j++) {
di = cl[j];
msg = di.message;
if (msg.length>0) {
trace("The following problem occurred '"+msg+"' while performing a
'"+ops[di.kind]+"' modification on/with '"+di.name+"' current server
value ["+di.curValue+"], value sent ["+di.newValue+"] Please fix!");
}
}
}
}
DataSet.saveToSharedObj()
Availability
Flash Player 7.
Edition
Flash MX Professional 2004.
Usage
dataSetInstance.saveToSharedObj(objName, [localPath])