[MGNLUI-6267] Default/selected property not working with uiframework dialogs Created: 05/Oct/20  Updated: 26/Oct/20  Resolved: 26/Oct/20

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: 6.2.3
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Monica Damborenea Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File uploadzip.png    
Issue Links:
Problem/Incident
Relates
relates to MGNLUI-5852 Streamline default value configuratio... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

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



 Comments   
Comment by Aleksandr Pchelintcev [ 26/Oct/20 ]

Duplicates MGNLUI-5852 and MGNLUI-6119

Generated at Mon Feb 12 09:34:47 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.