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

See Multivalue field in Magnolia documentation.

MultiValueFieldDefinition renders multiple fields that allow the user to perform multi-selection. The multi value field is used to select targets inside Magnolia, for example categories for a page.

Class: info.magnolia.ui.form.field.definition.MultiValueFieldDefinition

Here's an example configuration to select multiple categories browsing the categories workspace.

Node nameValue

 categories

 

    fieldNormal link field definition
       identifierToPathConverter 
          classinfo.magnolia.ui.form.field.converter.BaseIdentifierToPathConverter
       appNamecategories
       buttonSelectNewLabelfield.link.select.new
       buttonSelectOtherLabelfield.link.select.another
       classinfo.magnolia.ui.form.field.definition.LinkFieldDefinition
       fieldEditablefalse
       targetWorkspacecategory
       typeString
    classinfo.magnolia.ui.form.field.definition.MultiFieldDefinition
    labeldialogs.generic.tabCategorization.categories.label
    buttonSelectAddLabelfield.link.select.add
    descriptiondialogs.generic.tabCategorization.categories.description

Storing strategy

By default the transformerClass is set to MultiValueTransformer .

Assume that your MultiValueField is called 'multi' and contains a list of text fields. The  values will be stored as following:

Node nameValue
 multitext value field 1, text value field2

Configuration

You can use all common field properties and the following:

PropertyDescriptionDefault value
field
Parent node of one field composing the multi field. Mandatory. 
   classClass definition of the field 
   ...
Continue with field definition 
   ...Add any number of field definition that should composed the composite field. 
buttonSelectAddLabelButton label. Default is "Select new...", retrieved from a message bundle. Optional. 
buttonSelectRemoveLabelRemove Button label. Default is "Remove", retrieved from a message bundle. Optional. 
transformerClass Custom Transformer definition. Optional.

 


  • No labels