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

Support binding of enumDatasource

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Neutral
    • None
    • 6.2.13
    • None
    • None

    Description

      Actually, if an enumDatasource is used as datasource of a combobox field, the error message: "Linking to enums is not supported" is thrown because the method getDefaultConverter is unimplemented.

      For every particular enum that is used as the source of a Datasource, a subtype of EnumSelectFieldSupport has to be implemented providing a #defaultConverter() (so the enum values are converted into a presentation String)

      It would be also useful to implement an interface translatableEnum with one method String getTranslationKey() which could be implemented/extended by EnumSelectFieldSupport to get the keys for the translations of enum values.

      On some IDEs like IntelliJ, it is needed to include the annotation formatter:off - formatter_on between the implementationClass at the module descriptor regarding significant white spaces, it could be useful to include some java code control like trim for avoiding this issue

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                ccantalapiedra Carlos Cantalapiedra
                Votes:
                3 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:

                  Checklists

                    Task DoD