Option list data source
The option list data source provides a static list of configured options. By default, it does not provide any component implementation itself other than the one required by select fields.
| The option list data source is part of the Magnolia 6 UI framework.
The fully qualified class name is
 | 
The option list data source replaces the options configuration for select fields in Magnolia 5 UI. Previously, the option definition list was a core part of select field definition. This made it harder to convey the select fields that populate an item list in a more complex way than a predefined list of options (e.g. a database table or JCR workspace).
With the option list data source in Magnolia 6 UI, select fields can now specify the back-end configuration from which selection items are fetched. Preconfigured options then become concrete examples of such a data source, which only provides a predefined list of elements.
Example definition
datasource:
  $type: optionListDatasource
  options:
    - name: zambia
      value: zambia
    - name: argentina
      value: argentina
    - name: andorra
      value: andorra
    - name: switzerland
      value: switzerland
    - name: italy
      value: italyList of properties
| Property | Description | 
|---|---|
| 
 | required Use  | 
| 
 | required Parent node for selectable options. See info.magnolia.ui.datasource.optionlist.Option for more information. | 
|       | required Value saved to the repository when selected. | 
|       | optional, default is the parent node name Name of the node where the selected value is stored. If no name is defined, the parent node name will be used instead. | 
|       | optional Option label displayed to the user. The value is i18n-able. | 
|       | optional Displays an image next to the option. The value is a path to the image. | 
| 
 | optional, default is  Name of the data source. | 
| 
 | optional, default is  When  | 
Data source components
Module component mappings can be defined in the context of the current
data source (a component section should have an id in the form of
<id>datasource-<ds-name></id>, where <ds-name> is configured in the
definition).
| Type | Implementation | Description | 
|---|---|---|
| 
 | 
 | Provides delegates required by select fields. | 
<components>
  <id>datasource-optionlist</id>
  <component>
    <type>info.magnolia.ui.field.SelectFieldSupport</type>
    <implementation>info.magnolia.ui.datasource.optionlist.OptionSelectFieldSupport</implementation>
  </component>
</components>