CompositeFieldDefinition renders a complex field that display a composition of fields based on standard field definition.
Class: info.magnolia.ui.form.field.definition.CompositeFieldDefinition
Here is an example coming from the sample dialog show room module.
| Node name | Value |
|---|---|
| |
| | (individual field definition) |
| | |
| | info.magnolia.ui.form.field.definition.TextFieldDefinition |
| | dialog.devShow.allControls.tabLayout.simpleSwitch.fields.text.label |
| | String |
| | |
| | |
| info.magnolia.ui.form.field.definition.CompositeFieldDefinition | |
| dialog.devShow.allControls.tabLayout.configuredComposite.label |
Storing strategy
By default the transformerClass is set to CompositeTransformer.
Assume that your CompositeField is called 'composite' and contains two fields: a text field called 'simpleText' and a date field called 'simpleDate'. The values will be stored as following:
| Node name | Value |
|---|---|
| some text value | |
| 2006-05-01T21:47:58.230+02:00 |
Configuration
You can use all common field properties and the following:
| Property | Description | Default value |
|---|---|---|
fields | Parent node containing the single field that composed the composite field. | |
field1 | Parent node of one field composing the composite field. | |
class | Class definition of the field1 | |
... | Continue with field1 definition | |
... | Add any number of field definition that should composed the composite field. | |
| CompositeFieldDefinition class name. Mandatory. | |
| Custom Transformer definition. Optional. | |
layout | Define the field layout. Layout of the fields could be vertical or horizontal . Optional. | horizontal |

1 Comment
Lea Hänsenberger
The description property of child fields is ignored. Same for defaultValue