Data View
Introduction
The data view is a starting point for showing the contents of exactly one object. For example, if you want to show the details of a single program item, you can use a data view to do this:
In a more complex example, a data view can contain customer information and tab containers per specific topic (for example, addresses and payment information) with nested data grids for related objects:
Data View Footer
The footer of the data view is the section at the bottom of the data view that often contains buttons to confirm or cancel changes.
Properties
An example of data view properties is represented in the image below:
Data view properties consist of the following sections:
Common Section
Data Source Section
The data source determines which object will be shown in the data view. For more information on data sources, see Data Sources.
The data view supports the following types of data source: context, microflow, nanoflow, and listen to widget.
Data Source Type | Description |
---|---|
Context | A data source that uses a context object which is already available, such as a page parameter, snippet parameter or the object of a surrounding data container. Page parameters are passed to the page from another document, such as an Open Page action in another page or a Show Page activity in a microflow or nanoflow. In the case of a snippet parameter the data will come from a Snippet Call in a page, layout, or another snippet. If the context object comes from a data container, you must specify an entity path that starts in the context object and follows one or more associations. For more information on the context source, see Context Source. |
Microflow | A data source that runs a selected microflow and displays a return value. For more information on the microflow source, see Microflow Source. |
Nanoflow | A data source that runs a selected nanoflow and displays a return value. For more information on the nanoflow source, see Nanoflow Source. |
Listen to widget | A data source that allows a data view to display detailed information on an object in the list widget on the same page. For more information on listen to widget source, see Listen To Widget Source. |
Design Properties Section
Editability Section
Editable
The editable property indicates whether the data view as a whole is editable or not.
Value | Description |
---|---|
Yes | The data view is editable: each widget is determined to be editable based on its own editable property (default value for data views outside a snippet). |
Inherited from snippet call | Set to Yes or No by the containing data container of the snippet call (default value for data views inside a snippet). |
No | The data view is not editable: no widget inside the data view will be editable. |
Read-Only Style
This property determines how input elements are rendered if they are read-only.
Value | Description |
---|---|
Control (default) | The widget is displayed but disabled, so the value cannot be modified. |
Text | The widget is replaced by a textual representation of the value. |
General Section
Form Orientation
With this property, you can specify the position of the input widget labels inside the data view. If the orientation is horizontal, the labels will be placed next to the input elements. If the orientation is vertical, the labels will be placed above the input elements.
Note that form groups are responsive and the labels may be placed above input elements, even if the orientation is set to horizontal, depending on the viewport size. Also, note that a data view with a vertical orientation cannot be nested inside a data view with a horizontal orientation. In that case, the form groups will be rendered horizontally, regardless of the value of the orientation property.
Default: Horizontal
Label Width (Weight)
If the form orientation is set to horizontal, this property can be used to specify the width of the input widget labels inside the data view. The width is specified using column weights from the Bootstrap grid system. For more details, see Layout Grid.
Default: 3
Show Footer
With this property, you can specify whether you want the footer of the data view to be visible. The footer of nested data views is always invisible, regardless of the value of this property.
Default: True
Empty Entity Message
If this message is specified, a data view that receives no source data will show this message instead of its content. Otherwise, the data view will show its static content and disabled input elements. This property is a translatable text. For more details, see Language Menu.
There are a number of ways a data view can end up without source data. For instance, a data view with a Listen to widget data source will remain empty until an object is selected in the target grid. In this scenario, Empty entity message can be used to guide the user to select an item from the grid.
Default: empty
Visibility Section
Visibility determines whether a widget is displayed to the end-user as part of the page.
For more information on properties of this section, see the Visibility Section section in Properties Common in the Page Editor.
Performing Specific Actions
To perform actions on a data view, select it on a page and right-click it. The list of possible actions opens. While some actions from this list, such as Select data source, Edit condition for visible, are a quick way to set the properties, the following actions are specific actions that you can perform:
- Go to entity – opens a domain model and highlights an entity that is used as the data source
- Go to data source microflow – this action is only displayed when a microflow is set as the data source and opens this microflow
- Go to data source nanoflow – this action is only displayed when a nanoflow is set as the data source and opens this nanoflow