General Interface is an open source project hosted by the Dojo Foundation

Mapping XML Data to the CDF Container

Now you'll map the contents of the XML data in cache to the CDF container:

  1. Select the text box named T1.
  2. In the Properties Editor, type first in the Value field of the CDF Attribute Name.
    The name john appears in the T1 text box of the CDF mapping container, because the value john is assigned to the attribute first in the XML file.
    Click here to expand screenshot...


  3. Click the text box named T2.
  4. In the Properties Editor, type middle in the Value field of the CDF Attribute Name.
    The letter q appears in the T2 text box of the CDF mapping container, because the value q is assigned to the attribute middle in the XML file.

Cursoring CDF Records

This exercise illustrates how the CDF mapping container can cursor through its records to display different values in its descendant fields.

  1. Open the Local Data Cache and find the CDF document.
    The name of this cache document is assigned by the system and is a combination of the CDF GUI control ID and the string "_XML").
  2. Double-click the CDF file to open it for editing.
  3. Select and copy the record containing CDF attributes.
  4. Paste the record into the XML file, then change the record ID to 2, and the name of the attribute first to jane:
    Click here to expand screenshot...


  5. Right-click the XML file tab and select Save to Cache:
    Click here to expand screenshot...


  6. In the Properties Editor for the T1 component, change the CDF Record Id value from 1 to 2, to change the name in the T1 text box:
    Click here to expand screenshot...


This exercise illustrates how you can make each form be a separate data store---it always reads the value of the CDF Record Id, regardless of how the CDF control for the form is mapped.

A CDF container can:

  • Inherit a document from an ancestor CDF, or it can provide its own document.
  • Map the records of an ancestor CDF, or provide its own mapping.

You can continue nesting components inside components in the CDF mapping container, so that each nested component becomes a separate data item. Whichever container is the last in the nested chain determines the final mapping.

Contents

Searching General Interface Docs

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.