Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

info.magnolia.ui.form.field.transformer.*In 6 UI
composite.DelegatingCompositeFieldTransformerUse info.magnolia.ui.editor.CurrentItemProvider.
composite.NoOpCompositeTransformerNot needed.
multi.DelegatingMultiValueFieldTransformerUse info.magnolia.ui.editor.CurrentItemProvider.
multi.DelegatingMultiValueSubnodeTransformer

Use info.magnolia.ui.editor.JcrChildNodeProvider and set:

  • supportI18N to false
  • entryResolution to info.magnolia.ui.editor.MultiFieldEntryResolution$Definition
  • propertyNameDecorator to info.magnolia.ui.field.AlwaysEmptyPrefixNameDecorator
multi.MultiValueChildNodeTransformerDeprecated, no automatic conversion.
multi.MultiValueChildrenNodeTransformerDeprecated, no automatic conversion.
multi.MultiValueJSONTransformerDeprecated, no automatic conversion.
multi.MultiValueSubChildrenNodePropertiesTransformer

Use info.magnolia.ui.editor.JcrChildNodeProvider and set:

  • supportI18N to false
  • entryResolution to the now deprecated info.magnolia.ui.editor.ByLexicographicallyIndexedChildNodes$Definition
multi.MultiValueSubChildrenNodeTransformerDeprecated, no automatic conversion.
Code Block
languageyml
collapsetrue

Personalization (trait) transformers

The 5 UI transformers with personalization-related functions have undergone the following changes, but still use the old framework (magnolia-personalization-compatibility).

info.magnolia.personalization.* Description
cookie.CookieFieldTransformerCustom transformer for cookie traits.
ui.SimpleTraitValueTransformerNow functions as the default trait transformer.
visitor.transformer.VisitorTraitListToSetTransformerStill exists, but is no longer needed.

Example transformer configurations

The following examples show the same behavior in Magnolia 5 and Magnolia 6 UI.

Magnolia 5 UI

Code Block
languageyml
collapsetrue
form:
  tabs:
    - name: tabSwitch
      fields:
        - name: message
          fieldType: switchable
          options:
            - name: plainText
              value: plainText
            - name: richText
              value: richText
          fields:
            - name: plainText
              fieldType: text
            - name: richText
              fieldType: richText

    - name: tabMultiBasic
      fields:
        - name: multitext
          fieldType: multiValue
          transformerClass: info.magnolia.ui.form.field.transformer.multi.DelegatingMultiValueFieldTransformer
          field:
            name: txt
            fieldType: text

    - name: tabMultiDeleg
      fields:
        - name: items
          fieldType: multiValue
          transformerClass: info.magnolia.ui.form.field.transformer.multi.DelegatingMultiValueSubnodeTransformer
          field:
            name: itemComposite
            fieldType: composite
            transformerClass: info.magnolia.ui.form.field.transformer.composite.DelegatingCompositeFieldTransformer
            fields:
              - name: text
                fieldType: text
              - name: link
                fieldType: text

    - name: tabMultiLex
      fields:
        - name: itemsLex
          fieldType: multiValue
          transformerClass: info.magnolia.ui.form.field.transformer.multi.MultiValueSubChildrenNodePropertiesTransformer
          field:
            name: itemComposite
            fieldType: composite
            transformerClass: info.magnolia.ui.form.field.transformer.composite.NoOpCompositeTransformer
            fields:
              - name: text
                fieldType: text
              - name: link
                fieldType: text

...

Code Block
languageyml
collapsetrue
form:
  properties:
    switchable:
      $type: switchableField
      field:
        $type: radioButtonGroupField
        datasource:
          $type: optionListDatasource
          options:
            - name: plain
              value: plain
            - name: rich
              value: rich
      itemProvider:
        $type: currentItemProvider
      propertyNameDecorator: info.magnolia.ui.field.PrefixNameDecorator
      forms:
        - name: plain
          properties:
            plainText:
              $type: textField
        - name: rich
          properties:
            richText:
              $type: richTextField

    multitext:
      $type: jcrMultiField
      itemProvider:
        $type: currentItemProvider
      field:
        name: text
        $type: textField

    items:
      $type: jcrMultiField
      itemProvider:
        $type: jcrChildNodeProvider
        supportI18N: false
      entryResolution:
        class: info.magnolia.ui.editor.MultiFieldEntryResolution$Definition
        propertyNameDecorator: info.magnolia.ui.field.AlwaysEmptyPrefixNameDecorator
      field:
        $type: compositeField
        properties:
          text:
            $type: textField
          link:
            $type: textField

    itemsLex:
      $type: jcrMultiField
      itemProvider:
        $type: jcrChildNodeProvider
        supportI18N: false
      entryResolution:
        class: info.magnolia.ui.editor.ByLexicographicallyIndexedChildNodes$Definition
      field:
        $type: compositeField
        properties:
          text:
            $type: textField
          link:
            $type: textField

Personalization (trait) transformers

The 5 UI transformers with personalization-related functions have undergone the following changes, but still use the old framework (magnolia-personalization-compatibility).

...