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

Support defaultValue in fields of new ui framework

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 6.2.3
    • 6.2, 6.2.1
    • None

      Timebox: Find out via support tickets and other investigation which types of default values are problematic other than the example given in the last paragraph here. 5 SP

      In M5 fields have the ability to support default values (optional property defaultValue), in order to present users with some predefined choices. It was assumed that the value was a String.

      This property is still in the new field definition and now accepts a generic argument. Back in the day, a possible implementation was attempted, e.g. in the case of JCR, by specifying a node name (the configuration is commented out and still visible at contacts-v8.yaml). This no longer works as ItemToLinkConverter at JcrSelectFieldSupport tries to retrieve the model (a JCR Node) by uuid. However, when a defaultValue is provided as a node name the converter throws an exception (I assume that using uuid as default values would be most inconvenient for users).

      Dev notes:

      • see Julian's comment below for reproducible example

        Acceptance criteria

              apchelintcev Aleksandr Pchelintcev
              fgrilli Federico Grilli
              Votes:
              2 Vote for this issue
              Watchers:
              11 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - Not Specified
                    Not Specified
                    Logged:
                    Time Spent - 0.3d
                    0.3d