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

Default/selected property not working with uiframework dialogs

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Neutral Neutral
    • None
    • 6.2.3
    • None
    • None

      It is not possible to preselect an option in a comboBoxField or checkBoxField when using some dialogs in the new framework.

      I was able to make it work within the pages app, under a component dialog but it is not working for any action dialog that I have tested.

      Steps to reproduce

      1. Go to the Assets app and click on "Upload Zip archive". Note that there is no preselected item in the encoding field and that the contentstream label is missing.
      2. Go to the Resources app /dam-app-jcr/dialogs/upload.yaml
      3. Open the file, note that there is a defaultValue, let's also add the selected: true property and save:
        !inherit:ui-framework-jcr:import
        form:
          properties:
            encoding:
              $type: comboBoxField
              defaultValue: UTF-8
              datasource:
                $type: optionListDatasource
                options:
                  UTF-8:
                    value: UTF-8
                    selected: true
                  CP437:
                    value: CP437
        
        actions:
          commit:
            class: info.magnolia.dam.app.action.UploadAssetsActionDefinition
            availability:
              root: true
        
      1. Go back to the assets app and see that there is still no preselected item.

      I tested it both with comboBox field and CheckBoxField and neither is working

      (It is possible to change the contentstream label in /ui-framework-jcr/dialogs/import.yaml but this should be added for all customers)

      Changing directly the dialog definitions in /ui-framework-jcr/dialogs/ does not make the preselect work either.

      Expected results
      If we add a defaultValue or selected: true, that value should be initially selected in the dialog
       
      Actual results
      There is no preselected value

        Acceptance criteria

              Unassigned Unassigned
              mdamborenea Monica Damborenea
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD