Generic
Purpose
The Generic ViewTemplate displays one or more EntityFields of a single dataset in a vertical arrangement. It is suitable for compact information sections in PreviewViews, detail areas, or simple forms.
Figure: Generic ViewTemplate in a PreviewView.
Behavior
The displayed fields are configured through the fields property. Their order in the ViewTemplate determines the rendering order in the client.
In addition to the selected fields, several optional properties influence the presentation:
| Property | Description |
|---|---|
title | Title defined in the add dialog. It currently has no functional effect. |
editMode | Enables editing of the listed fields. |
showDrawer | Displays the content inside a drawer. |
drawerCaption | Defines the caption of the drawer. |
fixedDrawer | Prevents the drawer from being collapsed. |
hideLabels | Hides field labels. |
informationField | Displays an additional field at the top in edit mode. |
hideEmptyFields | Hides fields without values instead of rendering an empty label-value row. |
Configuration
To configure the displayed fields, open the editor of the fields property and add, remove, or reorder the required EntityFields.
When an EntityField with content type HTML is included, it is rendered as a rich-text field using the HTML editor.
Example usage
An example is the ViewTemplate Info in OrganisationPreview_view within Context Company.
In the ADITO client, this ViewTemplate can be seen under Contact Management > Company when the Preview is active and a company is selected. In the example, the ViewTemplate displays the fields LANGUAGE, STATUS, TYPE, and INFO of Organisation_entity from module contact.
The property showDrawer is enabled in this example, so the fields appear inside a drawer.