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

How to configure a multifield inside a multifield ? #436

@crisandani

Description

@crisandani

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions