Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

Issue with Nested multifield using coral UI multifield

Avatar

Level 3

I have created a nested multifield using coral UI like below

myinput

        - sling:resourceType = "granite/ui/components/coral/foundation/form/multifield"

        - composite = true

        + field

          - sling:resourceType = "granite/ui/components/coral/foundation/container"

          - name = "./addresses"

          + items

            + nestedmultifield

              - sling:resourceType = "granite/ui/components/coral/foundation/form/multifield"

              - composite =true

              + field

                - sling:resourceType = "granite/ui/components/coral/foundation/form/textfield"

                - name = "./items"

            + street1

              - sling:resourceType = "granite/ui/components/coral/foundation/form/textfield"

              - name = "street1"

I was able to save the data to the node and read it without any problems.However, When i configure the values in the dialog for the first time and save it and come back again to add an additional multifield when i click on ADD on the first multifield. It opens up the second multifield instead of the first one.

Do i need to have any additional configuration for it?

11 Replies

Avatar

Level 3

Hi Kautuksahni,

Problem is when we do a nested multifield not when we have a single multifield.

Multifield1

     + text

     + multifield2

          +text

          +text

With the above structure when we open the already configured dialog and try to add an item in the multifield1 it opens the multifield2.

Let me know if the issue is still not clear.

Avatar

Level 10

Here is a related doc - see if you can follow same steps for granite/coral MF - Create Nested MultiField Component in AEM 6.3

Avatar

Level 3

This doesn't work. What ever the add field we click it opens up the outer multifield only.

Avatar

Level 4

I am facing the same issue for nested multifields using coral multifield. Is there a fix for this?

Avatar

Level 1

I have same issue. Any solution?

Avatar

Level 1

Having the same issue. Anyone find a fix?

Update from Adobe:

"Nested multifields aren't supported in 6.3. They are only supported in AEM 6.4 and would be supported in AEM 6.5 as well.

If you cannot upgrade to 6.4 instead then please consider trying the ACS commons solution here:

https://adobe-consulting-services.github.io/acs-aem-commons/features/ui-widgets/multifield-extension...

That page notes that you should use coral 3 components on 6.3+ but it should say 6.4+."

Avatar

Level 2

Can someone confirm that there is no way to have a coral nested multifield on AEM 6.3?

Thanks

Avatar

Level 1

I fixed same issue with :

 

(function ($, $document, author) {
    "use strict";
    $(document).on('dialog-ready', function () {
        setTemplatesCorrectlyCoralCompositeMultifield();
    });

    function setTemplatesCorrectlyCoralCompositeMultifield(){
        console.log('executing setTemplatesCorrectlyCoralCompositeMultifield')        
        $('.foundation-form').find(".coral-Multifield").each(function(){
            var _multifield = this;
            $(this).children("[coral-multifield-template]").last().each(function(){
                _multifield.template = this;
            })
        })
    }

})($, $(document), Granite.author);