Page tree
Skip to end of metadata
Go to start of metadata

AbstractSelectFieldDefinition is a base definition class for various types of select fields. It specifies the type of data to populate the selection components and the type of data source used by the select field.

This select field definition is part of the Magnolia 6 UI framework. Use any of the following concrete implementations:

  • info.magnolia.ui.field.ComboBoxFieldDefinition
  • info.magnolia.ui.field.ListSelectFieldDefinition
  • info.magnolia.ui.field.TwinColSelectFieldDefinition

If you work with the Magnolia 5 UI framework, see Select field for Magnolia 5 UI instead.

Select field properties



Connects the field to a data source. Options are populated via the configured data source.

Use the fully qualified class name or the $type alias if the definition class is annotated with info.magnolia.ui.datasource.DatasourceType.


optional, default is OFF (STARTSWITH in link field)

Vaadin FilteringMode. Available values are CONTAINS and STARTSWITH.

For this to work, you have to set the textInputAllowed property of combobox field to true.

See also Common field properties.

Combobox field

ComboBoxFieldDefinition renders a dropdown option list where only one item can be selected. The component has a text field where items can be filtered based on user input.

Example definition

  label: Prefix
  $type: comboBoxField
    $type: optionListDatasource
      - name: mr
        label: Mr.
        value: mr
      - name: mrs
        label: Mrs.
        value: mrs
      - name: miss
        label: Miss
        value: miss

(info) JsonComboBoxFieldDefinition is an alternative that wraps the comboBoxField type and shows an error if a JSON datasource is not available.

  label: Name
  $type: jsonComboBoxField
    name: rest
    $type: jsonDatasource
    restClient: countries
    restCall: allCountries
      itemId: '$.name'
      items: '$.*'
      describeBy: '$.name'

Field properties


optional, default is false (true in link field)

Defines whether the user can select nothing in the field. When true, an empty item appears to the user.


optional, default is empty string

When emptySelectionAllowed is true, the empty item appears with the given caption. The value is i18n-able.


optional, default is 0

To enable paging and filtering in the field pop-up, value must be an integer greater than 0. Value of 0 disables paging and filtering and makes all items visible.



Sets the width of the field pop-up relative to the field itself. If no value is specified, the pop-up's width will automatically expand to fit the content of all displayed items.



Defines whether the selected item is visible when opening the field pop-up. Available values are true and false.


optional, default is false (true in link field)

When true, the user can type into the field to filter the available items. The filteringMode property of select field defines how the options are filtered.

When false, the field just shows the current selection.

See also select field and common field properties.

List field

ListSelectFieldDefinition renders a list box where more than one item can be selected. If the number of items exceeds the height of the component, a scrollbar will appear.

Example definition

  label: Contacts
  $type: listSelectField
    $type: jcrDatasource
    workspace: contacts
    describeByProperty: firstName
      - mgnl:contact

Field properties


optional, default is 4

Number of rows in the field. When set to 0, the actual number of rows is determined implicitly by the field.

See also select field and common field properties.

Twin-column field

TwinColSelectFieldDefinition renders two column lists where more than one item can be selected. The left column contains items available for selection, and the right column lists selected items. The component is useful for selecting large sets of items such as group and role memberships.

Example definition

  label: Groups
  $type: twinColSelectField
  leftColumnCaption: "Available groups"
  rightColumnCaption: "User is member of"
    $type: jcrDatasource
    workspace: usergroups
      - mgnl:group

Field properties



Text displayed above the left column. Typically retrieved from a message bundle.



Text displayed above the right column. Typically retrieved from a message bundle.

See also select field and common field properties.

  • No labels