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

defaultValue not working for fields inside a switchable

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 6.2.9
    • 6.2.6
    • framework

      Steps to reproduce

      add the following field to a content app detail view

      sample:
                $type: switchableField
                field:
                  $type: comboBoxField
                  layout: horizontal
                  datasource:
                    $type: optionListDatasource
                    scrollToSelectedItem: true
                    defaultValue: fastly
                    options:
                      - name: fast
                        value: fast
                      - name: other
                        value: other
                itemProvider:
                  $type: jcrChildNodeProvider
                forms:
                  - name: fast
                    properties:
                      token:
                        $type: textField
                      mytestfield:
                        $type: textField
                        defaultValue: test
                  - name: other
                    properties:
                      other:
                        $type: hiddenField #originally staticField, but that one is not saved, probably was just a wrong config/typo
      

       Expected results

      When opening the dialog mytestfield should have the value test, or if using a hiddenfield the value should be visible in jcr

      Actual results

      no default value in any of the tested fields, the hiddenfield is not saved

      Workaround

      save the value manually in jcr if using a hidden field

      Development notes

        Acceptance criteria

              mhaderka Martin Haderka
              tmiyar Teresa Miyar
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.25h
                    0.25h