Data versus Meta-data

The HTML Components (HTCs) used to manipulate data within Commerce Server Business Desk modules are instantiated on a Web page as DHTML behaviors associated with an element on the page, typically a DIV element. This element is known as the container element because it contains the HTC. The container element can have arbitrary attributes assigned to it, allowing them to be accessed from the code in the HTC. Such attributes are known as container attributes, and an important aspect of understanding each of the HTCs supplied with the Business Desk Framework is an understanding of the container attributes it expects to be associated with its container element.

A common type of value for a Business Desk HTC container attribute is a string that is the ID of a corresponding data-island in the document. Two of the container attributes expected by most of the Business Desk HTCs each provide the ID of an XML data-island. One of these IDs references a data-island that contains the actual data to be manipulated, represented in a standard format that is an XML representation of a set of database records. The other ID references a data-island that contains what is known as meta-data, or data about the data. For each of the fields in the records of the set, this includes such information as the type of the data and the name to be displayed in the column heading. In addition, the meta-data for many HTCs includes global configuration information that affects the display and behavior of the HTC as a whole.

The data for a particular field in one data-island and the corresponding meta-data for that field in the other data-island are associated using XML attributes and elements. Attributes in the meta-data XML identify a corresponding element in the XML containing the data.

The following table shows the container attributes associated with each of the Business Desk HTCs. With the exception of the meta-data container attribute named DataID, all the data and meta-data container attributes are assigned values that are the same as the value of the id attribute of the corresponding XML data-island (the id attribute of an xml or script element). The container attribute DataID is a special case; it is assigned a value that is the same as the id attribute of a field element within the data-island specified by the corresponding MetaXML container attribute.



HTC Name
Data
Container
Attributes
Meta-Data
Container
Attributes
Miscellaneous
Container
Attributes
DynamicTable DataXML MetaXML <none>
EditField DataXML MetaXML <none>
EditSheet DataXML MetaXML <none>
ExpressionBuilder <none> XMLCfgID <none>
ListBox <none> <none> <none>
ListEditor DataXML MetaXML <none>
ListSheet DataXML MetaXML <none>
QueryBuilder <none> XMLCfgID AutoActivate
TreeView DataXML <none> <none>

The format of the meta-data data-islands is specific to each HTC. For more information about the details of these XML formats, see Business Desk XML Structures.

With one exception, the data-island associated with the DataXML container attribute is in a standard format, regardless of which HTC is in use. For more information about this standard format, creating data-islands programmatically, and creating data-islands containing hierarchical data, see Standard XML Data Record FormatGetting Data to the Client, and XML Data Merging, respectively.

The exception to the standard format usage is the TreeView HTC, which expects the data-island associated with the DataXML container attribute to have a completely different format. For more information about this format, see TreeView Configuration.


All rights reserved.