Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-4496

Infer field definition type from 'type' property

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Neutral
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 6.0
    • Component/s: None
    • Labels:
      None

      Description

      Currently, we define a class property in the content type model for specifying a concrete field type definition e.g.
      class: info.magnolia.ui.form.field.definition.TextFieldDefinition

      It will be (@see MGNLUI-3882) also possible to define a shortened version of a concrete field e.g.
      fieldType: textField (depends on how its defined in FieldTypeRegistry)

      All those ways above let's 2Bean mechanisms to instantiate a field definition for you and you get the type for free if it's not being set explicitly.
      However, if you only set type property but leave class and in the future fieldType property empty, then 2Bean transformers does not know which class has to be instantiated.
      In this issue, it's aimed to have a mechanism which eventually infers this information from 'type' property with some default mappings.

        Checklists

        Acceptance criteria

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                ngoc.nguyenthanh Ngoc Nguyenthanh
                Reporter:
                ilgun Ilgun Ilgun
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Date of First Response:

                    Checklists

                    Task DoR

                      Time Tracking

                      Estimated:
                      Original Estimate - 2d
                      2d
                      Remaining:
                      Remaining Estimate - 0d
                      0d
                      Logged:
                      Time Spent - 2d
                      2d