Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

How to configure a multifield inside a multifield ? #436

Open
crisandani opened this issue May 8, 2020 · 1 comment
Open

How to configure a multifield inside a multifield ? #436

crisandani opened this issue May 8, 2020 · 1 comment

Comments

@crisandani
Copy link

Environment

Bobcat version:

Bobcat modules used:

  • bb-aem-core
  • bb-aem-65
  • bb-core
  • bb-junit5

Browser + version:
Chrome 81

I have problems configuring a component that contains a multifield in another multifield

Expected Behavior

Create 3 items of first multifield and complete them with the data from .yaml file

Actual Behavior

Create 1 item of first multifield and complete them with the data from .yaml file . Create 2 items of second multifield and crashes the test

Steps to reproduce

This is the Yaml file:

Tab:
  - label: 'Multifield1'
    type: MULTIFIELD
    value:
    - item:
      - type: PATHBROWSER
        label:  'Image'
        value: '/content/dam/folder/Asset.png'
      - type: TEXTFIELD
        label:  'Heading'
        value: 'Create your own template'
      - type: RICHTEXT
        label:  'Description'
        value: 'value'

    - item:
      - type: PATHBROWSER
        label:  'Image'
        value: '/content/dam/folder/Asset.png'
      - type: TEXTFIELD
        label:  'Heading'
        value: 'Automatic Backup Data'
      - type: RICHTEXT
        label:  'Description'
        value: 'value' 

    - item:
      - type: PATHBROWSER
        label:  'Image'
        value: '/content/dam/folder/Asset.png'
      - type: TEXTFIELD
        label:  'Heading'
        value: 'Page Builder'
      - type: RICHTEXT
        label:  'Description'
        value: 'value'

And this is cq_dialog File:

<multifield1
        jcr:primaryType="nt:unstructured"
        jcr:title="Multifield1"
	fieldLabel="Multifield1"
        ling:resourceType="granite/ui/components/coral/foundation/form/multifield"
        composite="{Boolean}true">
        <field
		jcr:primaryType="nt:unstructured"
		sling:resourceType="granite/ui/components/coral/foundation/container"
                name="./multifield1Items">
            <items jcr:primaryType="nt:unstructured">
                <image
                        jcr:primaryType="nt:unstructured"
                        sling:resourceType="granite/ui/components/coral/foundation/form/pathfield"
                        class="cq-droptarget"
                        fieldLabel="Image"
                        required="{Boolean}false"
                        rootPath="/content/dam/"
                        fieldDescription="Drag and drop an image asset from the asset finder here."
                        name="./imagePath"/>
		<heading
			jcr:primaryType="nt:unstructured"
			sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
			fieldLabel="Heading"
			name="./heading"/>
		<text
			jcr:primaryType="nt:unstructured"
			sling:resourceType="cq/gui/components/authoring/dialog/richtext"
			fieldLabel="Description"
			name="./description"
			useFixedInlineToolbar="{Boolean}true">
			//more richText settings
		</text>
		<multifield2
			jcr:primaryType="nt:unstructured"
			jcr:title="Multifield2"
			sling:resourceType="granite/ui/components/coral/foundation/form/multifield"
			composite="{Boolean}true">
			<field
				jcr:primaryType="nt:unstructured"
				sling:resourceType="granite/ui/components/coral/foundation/container"
				name="./multifield2Items">
				<items jcr:primaryType="nt:unstructured">
					<check
						jcr:primaryType="nt:unstructured"
						sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
						fieldLabel="Check List"
						name="./check"/>
				</items>
			</field>
		</multifield2>
            </items>
        </field>
</multifield1>
@crisandani
Copy link
Author

I think the configuration hierarchy of the .yaml file doesn't work well. I have a RICHTEXT field before multifield and another in multifield. For the RICHTEXT field inside the multifield I set a value but change the one before the multifield.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant