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

Allow select fields non-string values (i.e. ditch hardcoded conversion of selected item to link)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 6.2
    • None
    • None
    • None
    • UI Framework 10, UI Framework 11, UI Framework 12
    • 5

      At the moment, all select fields forcibly convert their selected values to string (reference), effectively preventing themselves from having values of different types.

      For example:
      info.magnolia.ui.framework.datasource.optionlist.OptionSelectFieldSupport creates itemToLinkConverter which model class is set to String this than cause java.lang.ClassCastException when field type is set to something else (Long etc.)

      We can simply eliminate the forced conversion logic and should the item to link conversion happen - it can be configured via field definition. This would simplify the implementation of the LinkField support quite a lot as well.

        Acceptance criteria

              mdivilek Milan Divilek
              mdivilek Milan Divilek
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD