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:
2 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.
An example of data view properties is represented in the image below:
Data view properties consist of the following sections:
3.1 Common Section
For more information on properties in this section, see the Common Section section in Properties Common in the Page Editor.
3.2 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 determining that wherever you are opening the page from, you are passing the selected object. For example, when you add the Show Page activity in the microflow, you select the page and the object to pass. (For more information on the microflows, see Microflows.) That means that when the page is opened in the microflow, the object of this type is provided and will be shown in the data view on the page.
If a data view is nested inside another data widget, you can 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.|
3.3 Design Properties Section
The Design Properties allow you to change spacing and alignment of the widget and hide it on phone, tablet, or desktop, if needed. Design properties may vary depending on the type of the widget. For example, for the text widget you can change its font weight, color, alignment, and letter case.
3.4 Editability Section
The editable property indicates whether the data view as a whole is editable or not.
|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.|
3.4.2 Read-Only Style
This property determines how input elements are rendered if they are read-only.
|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.|
3.5 General Section
3.5.1 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.
3.5.2. 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.
3.5.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.
3.5.4 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.
3.6 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.
4 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 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