Using the Data Designer
Tabular Data ( )
The Tabular data button inserts a table into which you can place other types of fields. It's similar to a group box.
Tabular data's main advantage over a group box is that it lets you place fields in columns (see below).
NoteGroup Box () describes many features that also apply to tabular data. Read that section to gain a full understanding of working with tabular data.
Creating a Table
First you insert the table. Then, you insert an appropriate type of field into each column. As examples, in the table above, the Description field type would be plain text, while the In Stock? field type would be choices.
When you insert a field into a table, its caption initially appears to the left of the data entry region (see below).
Ektron recommends moving the caption into the column headers (see below).
Table commands (such as add row and add column) are available by placing the cursor inside a table cell and right clicking the mouse.
Important!Only table cells into which you place a field are available to visitors of your Web page.
Editing Tabular Data
To edit tabular data, hover the cursor carefully over any table border line until you see a four-headed arrow. Then, click the right mouse button and select Field Properties.
NoteYou cannot reduce the number of columns by editing the Tabular Data dialog's Columns field. To delete a column, place the cursor in the column and select Delete Column from the table commands. The table commands are available in the table drop-down menu, the table toolbar (which is hidden by default), or the right-click context menu.
How Tabular Data Forms XML Structure
Tabular data creates three levels of XML tags:
- inner level: each field in the table
- middle level: each row in the table
- outer level: the entire set of table data
To explain how this works, we'll use the following contact list as an example.
Name Phone John Doe 555-1212 john.doe@email.com Mary Smith 555-8765 msmith@mymail.netHow XML Tags are Assigned to Field Names
When you insert a field into a table, a dialog helps you define the field type. For example, when inserting a plain text field, the Plain Text Field dialog appears. On that dialog, the value of the Phone field defines the tags that enclose that field's contents.
To continue our example, every contact is represented in XML as:
<Name>John Doe</Name> <Phone>555-1212</Phone> <Email>john.doe@email.com</Email><Name>Mary Smith</Name> <Phone>555-8765</Phone> <Email>msmith@mymail.net</Email>How XML Tags are Assigned to Table Rows
Each row of the table collects information for one contact. On the Tabular Data Box dialog, the Row Name field defines the XML tag that groups information for each contact. For example, the Row Name field value is Contact.
<Contact> <Name>John Doe</Name> <Phone>555-1212</Phone> <Email>john.doe@email.com</Email> </Contact> <Contact> <Name>Mary Smith</Name> <Phone>555-8765</Phone> <Email>msmith@mymail.net</Email> </Contact>How XML Tags are Assigned to the Entire Table
When you create a table, the name you give it (in the Name field of the Tabular Data Box dialog) defines the XML tag that groups all contacts on the table. In this example, the name is AddressBook.
<AddressBook> <Contact> <Name>John Doe</Name> <Phone>555-1212</Phone> <Email>john.doe@email.com</Email> </Contact> <Contact> <Name>Mary Smith</Name> <Phone>555-8765</Phone> <Email>msmith@mymail.net</Email> </Contact> </AddressBook>Dialog Box
Fields on the Tabular Data Dialog
Field Description Name Enter the name of this table.See Also: How Tabular Data Forms XML StructureNote that you cannot enter spaces nor most special characters (!@#$%^&*()+=<>,.:;'"{}[]\|`~) into this field.The Name Field's Default ValueBy default, the Data Designer assigns a name made up of Field followed by the next available number. So, the first field's default name is Field1, the second field's default name is Field2, etc. You can change the default if you want. Display name Enter the text that appears when a user hovers the cursor over the table's column headers. Use See The Use Field Allow See The Allow Field
Note: If you check More than one here, you are allowing the user to insert an entirely new table, not an additional table row.
Rows Row name Enter the name of the XML tag used to collect data for each entry in the table.See Also: How Tabular Data Forms XML Structure Row display name Enter the text that appears when a user hovers the cursor over the table's cells. Use this field to describe the kind of information to be inserted into the table's cells. Minimum number If desired, enter the minimum number of rows for this table.If you enter a number and the data entry user tries to save the screen without inserting at least the minimum number of rows, he is informed that Element content is incomplete according to the DTD/Schema.By default, the user is allowed to cancel or save the screen anyway. However, the system administrator determines whether or not a user can save an invalid document. Maximum number If desired, enter the maximum number of rows for this table. If you don't want to assign a maximum number, check the Unlimited check box.Result of Assigning a MaximumWhen this table appears on a data entry screen, and a user adds the maximum number of rows, the Insert Above and Insert Below options are grayed out on the menu (see example below). Columns Enter the number of columns to appear in the table.See Also: Editing Tabular Data Caption If desired, enter text to describe this table on the data entry screen. The caption appears centered above the table.After you insert this field onto the screen, you can use eWebEditPro+XML's formatting capabilities to modify the caption's size, font, color, and other attributes.