Rendering a Table

A tabular rendering is generated by a ContainerRenderer object under control of a CalendarView or TableView object. The calendar view or table view is structured using rows and columns. Each entry in the table, at the intersection of a row and a column, is called a cell. A frame in the HTML output normally consists of a heading row containing heading cells, followed by one or more rows containing property cells. The heading row is usually rendered as one HTML table and the remaining rows as a separate table.

The number of rows after the heading row is determined by the container renderer's RowsPerPage property. The row number of each object being rendered corresponds to that object's position in the underlying table that contains it.

The overall rendering of the heading row is controlled by the HeadingRowPrefix and HeadingRowSuffix properties. Each subsequent row is rendered under control of the RowPrefix and RowSuffix properties. These prefixes and suffixes delineate the row with HTML table tags and specify rendering characteristics for the entire row, such as bold or italic, font size and color, and alignment within the cells. The table as a whole is enclosed by the TablePrefix and TableSuffix properties, which delineate the table and specify characteristics such as the table border. All the prefixes and suffixes contain rendering information but no text.

Each heading cell takes its text from the appropriate Column object's Name property and renders it according to the information in the container renderer's HeadingCellPattern property.

Each property cell in the subsequent rows takes its value directly from the property being rendered in that column. All property cells are rendered according to the container renderer's CellPattern property. Within the CellPattern specification, each individual cell derives additional rendering information from the column's RenderUsing property if this has been supplied. Otherwise, if there is a Format object associated with the column property, its Pattern objects are searched for one with a Value property matching the column property's value. If such a pattern is found, its RenderUsing property supplies the rendering information. If no pattern can be found with a value match, or if no format has been defined for the column property, it is rendered by default according to its data type and value.

The following diagram shows how the CDO Rendering Library properties are used to render the table:

Table
Prefix
Heading
RowPrefix
Heading
CellPattern
Heading
CellPattern
Heading
RowSuffix
Table
Suffix
Table
Prefix
RowPrefix CellPattern CellPattern RowSuffix
RowPrefix CellPattern CellPattern RowSuffix
Table
Suffix