User Guide
Delta interface (Flash Professional only) 393
Description
Method; returns a unique identifier for this item within the DeltaPacket collection. Use this ID in
the source component for the delta packet to receive updates and make changes to items that the
delta packet was generated from. For example, assuming that the DataSet component sends
updates to a server and the server returns new key field values, this method allows the DataSet
component to examine the resulting delta packet, find the original transfer object, and make the
appropriate updates to it.
Example
The following example calls the getId() method:
while(dpCursor.hasNext()) {
dpDelta = Delta(dpCursor.next());
trace("id ["+dpDelta.getId()+"]");
}
Delta.getItemByName()
Availability
Flash Player 7.
Edition
Flash MX Professional 2004.
Usage
delta.getItemByName(name)
Parameters
name
A string that specifies the name of the property or method for the associated DeltaItem
object.
Returns
The DeltaItem object specified by name. If no DeltaItem object is found that matches name, this
method returns
null.
Description
Method; returns the DeltaItem object specified by name. When method calls or property changes
on a transfer object are needed by name, this method provides the most efficient access.
Example
The following example calls the getItemByName() method:
private function buildFieldTag(deltaObj:Delta, field:Object,
isKey:Boolean):String {
var chgItem:DeltaItem = deltaObj.getItemByName(field.name);
var result:String= "<field name=\"" + field.name + "\" type=\"" +
field.type.name + "\"";
var oldValue:String;
var newValue:String;