This encoder converts data within the DeltaPacket into XPath statements that are supplied to the XUpdateResolver component, but it needs additional information from you to do its job.

6.

Double-click the encoder options property. When prompted for a value for the rowNodeKey property, type datapacket/row[@id=’?id’].

This property identifies which node within the XML file will be treated as a record within the data set. It also defines which element or attribute combination makes the row node unique, as well as the schema field within the DataSet component that will represent it. See “Updates sent to an external data source” in Flash Help.

In the sample XML file, the id attribute of the datapacket/row node is the unique identifier, and it will be mapped to the DataSet component’s ID schema field. This is defined with the following expression:

datapacket/row[@id='?id']

7.

In the Component inspector, click the Bindings tab.

8.

Click the Add Binding button.

9.

In the Add Binding dialog box, click the deltaPacket property and click OK.

10.

In the Component inspector Bindings tab, double-click the Bound To property.

11.

In the Bound To dialog box, click the Data Set component, and then click the deltaPacket schema location and click OK.

This binding will copy the DeltaPacket component to the XUpdateResolver component so that it can be manipulated before it is sent to the server.

Note

The data is copied after the DataSet component’s applyUpdates() method is called.

12.

Drag a TextArea component onto the Stage, and in the Property inspector enter the instance name deltaText.

13.

Still in the Property inspector, set the Width to 360.

14.

Select the component, and then in the Component inspector, click the Bindings tab.