[JSFIELD-30] JS Field breaks im used in combination with switchable field and combobox Created: 08/Mar/23  Updated: 14/Mar/23  Resolved: 10/Mar/23

Status: Resolved
Project: Java Script UI (App and Dialog Fields)
Component/s: None
Affects Version/s: 1.2.1
Fix Version/s: 1.2.2

Type: Bug Priority: High
Reporter: Tobias Kerschbaum Assignee: Yen Lac Tue
Resolution: Not an issue Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: 0.25h
Original Estimate: Not Specified

Attachments: PNG File colorPicker_combobox.png     PNG File colorPicker_radioButton.png     Text File js-field-error.log    
Template:
Acceptance criteria:
Empty
Date of First Response:

 Description   

Steps to reproduce

  1. Add a JavaScript Field into a switchable field in using a combobox like:
label: Image
form:
  implementationClass: info.magnolia.ui.javascript.form.FormViewWithChangeListener
  properties:
    imageChooser:
      label: Image
      $type: switchableField
      field:
        $type: comboBoxField
        defaultValue: internal
        layout: horizontal
        datasource:
          $type: optionListDatasource
          options:
            - name: internal
              label: Image Dialog
              value: internal
            - name: cloudinary
              label: Cloudinary Widget
              value: cloudinary
      itemProvider:
        $type: jcrChildNodeProvider
      forms:
        - name: internal
          properties:
            image:
              label: Image
              $type: damLinkField
        - name: cloudinary
          properties:
            cloudinaryImage:
              label: Text color
              $type: javascriptField
              fieldScript: /headless-ecommerce/webresources/colorField.html
              height: 50
  1. Open the dialog and try to switch to the part with the js field

.. Logs, screenshots, gifs...

Expected results

.. Justify non-trivial expectations with a link to a doc or a relevant discussion.

Actual results

see: js-field-error.log

Workaround

It is working with the $type: comboBoxField.

Development notes



 Comments   
Comment by Teresa Miyar [ 08/Mar/23 ]

Can you try it with other type of field not the Cloudinary one? In this case you are nesting Jsdialog fields, we cannot support that.

Comment by Tobias Kerschbaum [ 08/Mar/23 ]

In that case I've been just lazy and did not change the label of the field. It is using the standard colorPicker JS-Dialog Field. 

Generated at Mon Feb 12 02:16:25 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.