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

Allow to configure the default value resolution strategy in FieldDefinition

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Won't Do
    • Icon: Neutral Neutral
    • None
    • None
    • None
    • None

      Current approach to configuring the default value is a bit rigid when it comes to typing and conversion.

      • It is simple when the fields presentation form is the same as the model (stored) form, e.g. in case of a simple text field.
      • still okay when the model type stored in JCR is string or simple type: since we convert the default value to presentation form when populating the form, there're no problems (e.g. option list select, where options are stored by their configured string values)
      • it is less shiny with JCR selects: the stored value is string (but typically UUID, depends on the configuration), whereas the default value is typically a path. It works currently due to fuzzy logic in default node-2-backend converter coming with JCR selects: it supports siliently both paths and UUIDs as model forms.
      • problem 1: what if the user needs to specify default value in presentation form, which is different from the model form? Good if the converter detects that the passed value is already in presentation form and will bail out. But what if not? Seems like it would be nice if we could specify in definition that the default value is actually in presentation form.

        Acceptance criteria

              Unassigned Unassigned
              apchelintcev Aleksandr Pchelintcev
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: