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

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 nameValue



    fields(individual field definition)

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 nameValue
 compositesimpleTextsome text value



You can use all common field properties and the following:

PropertyDescriptionDefault value
Parent node containing the single field that composed the composite field. 
   field1Parent node of one field composing the composite field. 
     classClass definition of the field1 
Continue with field1 definition 
   ...Add any number of field definition that should composed the composite field. 
classCompositeFieldDefinition class name. Mandatory.
transformerClassCustom Transformer definition. Optional. 
layoutDefine the field  layout. Layout of the fields could be
vertical  or horizontal . Optional.




  • No labels

1 Comment

  1. The description property of child fields is ignored. Same for defaultValue