Data Sources

Last modified: February 13, 2024

1 Introduction

Widgets that display information stored in entities require you to assign a method by which to retrieve the relevant data. Such methods are collectively known as data sources. Widgets that require a data source include all data widgets and input widgets. Pluggable widgets can also use data sources.

In this document, we describe data sources of data widgets.

2 Data View

A data view supports the following data sources:

  • Context – the data view gets its object from the context: either from a page parameter or a surrounding data container
  • Microflow – the data view object is determined by the result of calling the selected microflow. The microflow can take objects in the context as parameter and needs to return a single object.
  • Nanoflow – objects retrieved are determined by the result of calling the selected nanoflow. The nanoflow can take objects in the context as a parameter and needs to return a single object.
  • Listen to widget – the data view object depends on the selection in a list widget (a data grid, template grid, or list view)

3 List Widgets

A data grid, template grid, and list view are list widgets. Also some pluggable widgets may behave as list widgets and use data sources. Supported data sources are listed below:

  • Database – objects are retrieved from the database; database constraints can be used to limit which objects are shown.
  • XPath – objects are retrieved from the database; an XPath constraint can be used to constrain which objects are shown.
  • Microflow – objects retrieved are determined by the result of calling the selected microflow. The microflow can take objects in the context as parameter and needs to return a list of objects.
  • Nanoflow – objects retrieved are determined by the result of calling the selected nanoflow. The nanoflow can take objects in the context as a parameter and needs to return a list of objects. Nanoflow data source is only available for data views and list views.
  • Association – the objects are retrieved from memory by following an association from the object in the context. So, this data source is only available when a widget is nested in another data container.

The data source also determines which features of the widget are enabled. For example, only widgets with a database or XPath data source can contain a search bar.

4 Read More