Common workflow for the XUpdateResolver component

The following procedure outlines the typical workflow for the XUpdateResolver component.

To use an XUpdateResolver component:

  1. Confirm that your Publish Settings specify ActionScript 2.0.
  2. Add two instances of the XMLConnector component and one instance each of the DataSet component and the XUpdateResolver component to your application, and give them instance names.
  3. Select the first XMLConnector component, and use the Parameters tab of the Component inspector to enter the URL for the external XML data source that you want to access.
  4. With the XMLConnector component still selected, click the Schema tab of the Component inspector and import a sample XML file to generate your schema.

    NOTE

    You may need to create a virtual schema for your XML file if you want to access a subelement of the array that you are binding to the data set.

  5. Use the Bindings tab of the Component inspector to bind an array in the XMLConnector component to the dataProvider property of the DataSet component.
  6. Select the DataSet component and use the Schema tab of the Component inspector to create the DataSet fields that will be bound to the fields of the object within the array.
  7. Use the Bindings tab of the Component inspector to bind data elements (DataSet fields) to the visual components in your application.
  8. Select the Schema tab of the XUpdateResolver component. With the deltaPacket component property selected, use the Schema Attributes pane to set the encoder property to the DataSetDeltaToXUpdateDelta encoder.
  9. Select Encoder Options and enter the rowNodeKey value that uniquely identifies the row node within the XML file.

    NOTE

    The rowNodeKey value combines an XPath statement with a field parameter to define how unique XPath statements should be generated for the update data contained within the delta packet.

  10. Click the Bindings tab and create a binding between the XUpdateResolver component's deltaPacket property and the DataSet component's deltaPacket property.
  11. Create another binding from the xupdatePacket property to the second XMLConnector component to send the data back to the external data source.

    NOTE

    The xupdatePacket property contains the formatted delta packet (XUpdate statements) that will be sent to the server.

  12. Add a trigger to initiate the data binding operation: use the Trigger Data Source behavior attached to a button, or add ActionScript.

In addition to these steps, you can also create bindings to apply the result packet sent back from the server to the data set by the XUpdateResolver component.

For a step-by-step example that resolves data to an external data source using XUpdate, see "Data Integration: Using XML for a Timesheet".