Expand my Community achievements bar.

SOLVED

AEM Multifield component has limit to nested element

Avatar

Level 2

I am working on a AEM dialog multifield granite/ui/components/coral/foundation/form/multifield component.
One multifield contains 15 elements, for examlpe: textarea, checkbox, pathfield, fileupload, textfield, datepicker. When a certain amount of multifields is reached for example if multifield has 15 nested elements then I can create only 76 multifields. After 76 multifields the 'Add button' disappears and after deleting an element, the element is removed but there are still 76 elements in the list and the add button does not appear.

PolinaVinni_0-1675258282574.pngPolinaVinni_1-1675258465458.png

 

 is there a way to create more multifield with nested elements?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @PolinaVinni 

 

It is not recommended to use the multi-field to store massive data. Similar question:: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-6-5-multifield-is-ther...

 


Hope it helps!

Thanks,
Kiran Vedantam

View solution in original post

5 Replies

Avatar

Community Advisor

Hi,

there is no limit to multifeld

could you please share the dialog xml?

 

same question is answered here as well

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-multifield-works-incor... 



Arun Patidar

Avatar

Level 2
I use this version Adobe Experience Manager 2021.11.6058

<?
xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0"
   xmlns:sling="http://sling.apache.org/jcr/sling/1.0" jcr:primaryType="nt:unstructured" sling:resourceType="cq/gui/components/authoring/dialog" jcr:title="Hero Banner Carousel" extraClientlibs="[toggleinput, hideinputcarousel]">
   <content jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/container">
      <layout jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/layouts/tabs" type="nav" />
      <items jcr:primaryType="nt:unstructured">
         <tab_0 jcr:primaryType="nt:unstructured" jcr:title="Slides" sling:resourceType="granite/ui/components/foundation/section">
            <layout jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns" />
            <items jcr:primaryType="nt:unstructured">
               <column jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/container">
                  <items jcr:primaryType="nt:unstructured">
                     <element_00 jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/form/multifield" composite="{Boolean}true" fieldLabel="Add Banner Slides">
                        <field jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/container" name="./slides" fieldLabel="Add Banner Slides">
                           <items jcr:primaryType="nt:unstructured">
                              <column jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/container">
                                 <items jcr:primaryType="nt:unstructured">
                                    <element_0 jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/form/checkbox" name="./showWithoutPromoPage" text="Display slide in Hero Banner Carousel without promotion page" uncheckedValue="false" value="true" />
                                    <element_1 jcr:primaryType="nt:unstructured" name="./promotionPage" fieldLabel="Promotion Page" rootPath="/content/eyas-web" sling:resourceType="granite/ui/components/foundation/form/pathfield" granite:class="promotion-page-field" />
                                    <element_2 jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/form/textarea" name="./heading" fieldLabel="Heading" required="{Boolean}false" fieldDescription="Will display in white by default. To highlight parts of the heading text (yellow) wrap the text in strong tags" granite:class="toggle-carousel-field" />
                                    <element_3 jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/form/textarea" name="./subHeading" fieldLabel="Sub Heading" granite:class="toggle-carousel-field" />
                                    <element_4 jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/form/textarea" name="./footer" fieldLabel="Terms and Conditions" granite:class="toggle-carousel-field" />
                                    <element_5 jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/form/numberfield" name="./bonusId" fieldLabel="Bonus ID" granite:class="toggle-input toggle-carousel-field" />
                                    <element_6 jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/form/textfield" name="./promoCode" fieldLabel="Promo Code" granite:class="toggle-input toggle-carousel-field" />
                                    <element_7 jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/form/textfield" name="./buttonLabel" fieldLabel="Button Label" granite:class="toggle-carousel-field" />
                                    <element_8 jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/form/checkbox" name="./buttonShown" text="Display Button" checked="true" uncheckedValue="false" value="true" granite:class="toggle-carousel-field" />
                                    <element_9 jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/form/checkbox" name="./buttonEnabled" text="Enable Button" checked="true" uncheckedValue="false" value="true" granite:class="toggle-carousel-field" />
                                    <element_10 jcr:primaryType="nt:unstructured" name="./buttonLink" fieldLabel="Button Link" rootPath="/content/my-web" sling:resourceType="granite/ui/components/coral/foundation/form/pathfield" granite:class="toggle-carousel-field" />
                                    <element_11 fieldLabel="Banner Image" required="{Boolean}false" fileReferenceParameter="./imgSrc" name="./srcField" sling:resourceType="cq/gui/components/authoring/dialog/fileupload" mimeTypes="[image]" allowUpload="{Boolean}false" autoStart="{Boolean}false" class="cq-droptarget" fileNameParameter="./fileName" jcr:primaryType="nt:unstructured" multiple="{Boolean}false" uploadUrl="${suffix.path}" useHTML5="{Boolean}true" granite:class="toggle-carousel-field" />
                                    <element_12 fieldLabel="Mobile Banner Image" fileReferenceParameter="./mobileImgSrc" name="./srcField" sling:resourceType="cq/gui/components/authoring/dialog/fileupload" mimeTypes="[image]" allowUpload="{Boolean}false" autoStart="{Boolean}false" class="cq-droptarget" fileNameParameter="./fileName" jcr:primaryType="nt:unstructured" multiple="{Boolean}false" uploadUrl="${suffix.path}" useHTML5="{Boolean}true" granite:class="toggle-carousel-field" />
                                    <element_13 jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/form/textfield" name="./imgAlt" fieldLabel="Banner Image Alt Text" required="{Boolean}false" granite:class="toggle-carousel-field" />
                                    <element_14 jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/form/datepicker" valueFormat="YYYY-MM-DD" name="./displayFrom" fieldLabel="Display From" required="{Boolean}false" granite:class="toggle-carousel-field" />
                                    <element_15 jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/form/datepicker" valueFormat="YYYY-MM-DD" name="./displayTo" fieldLabel="Display To" required="{Boolean}false" granite:class="toggle-carousel-field" />
                                 </items>
                              </column>
                           </items>
                        </field>
                     </element_00>
                  </items>
               </column>
            </items>
         </tab_0>
      </items>
   </content>
</jcr:root>

Avatar

Community Advisor

Can you try using coral3 types at all the places and all the resourcetypes

you are using mix of coral2 and coral3 types

e.g.

Coral2 - granite/ui/components/foundation/container -

Coral3 - granite/ui/components/coral/foundation/container

 

Example:

https://github.com/arunpatidar02/aemaacs-aemlab/blob/master/ui.apps/src/main/content/jcr_root/apps/a... 



Arun Patidar

Avatar

Level 2

Hi, @arunpatidar  I changed all elements to using coral3 granite/ui/components/coral/foundation/container and received: 
the interface is a little broken and

behavior of multifield remains the same. I can't create more than 73 items in 
multifield
PolinaVinni_0-1675339897010.png

 

Avatar

Correct answer by
Community Advisor

Hi @PolinaVinni 

 

It is not recommended to use the multi-field to store massive data. Similar question:: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-6-5-multifield-is-ther...

 


Hope it helps!

Thanks,
Kiran Vedantam