Expand my Community achievements bar.

SOLVED

AEM6.3 - Issue with a pathfield in a multifield dialog

Avatar

Level 3

Hi,

I am using the pathfield from granite/ui/components/coral/foundation/form/pathfield in many places of our website and I never had a problem.

Now, I am trying to use it on a multifield, and happens that if I select a path the value is stored but its not retrieved when I open the dialog again.

Does anyone knows some workaround to correct this?

Below are my dialog. Thanks in advance!

<?xml version="1.0" encoding="UTF-8"?>

<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"

    jcr:primaryType="nt:unstructured"

    jcr:title="Carousel Component"

    sling:resourceType="cq/gui/components/authoring/dialog">

    <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">

            <carousel-component

                jcr:primaryType="nt:unstructured"

                jcr:title="Example"

                sling:resourceType="granite/ui/components/foundation/section">

                <layout

                    jcr:primaryType="nt:unstructured"

                    sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns"

                    margin="{Boolean}false"/>

                <items jcr:primaryType="nt:unstructured">

                    <column

                        jcr:primaryType="nt:unstructured"

                        sling:resourceType="granite/ui/components/foundation/container">

                        <items jcr:primaryType="nt:unstructured">

                            <item

                                jcr:primaryType="nt:unstructured"

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

                                class="foundation-layout-util-maximized-alt long-label"

                                fieldLabel="Item Carousel component">

                                <field

                                    jcr:primaryType="nt:unstructured"

                                    sling:resourceType="granite/ui/components/foundation/form/fieldset"

                                    acs-commons-nested=""

                                    name="./carousel">

                                    <layout

                                        jcr:primaryType="nt:unstructured"

                                        sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns"

                                        method="absolute"/>

                                    <items jcr:primaryType="nt:unstructured">

                                        <column

                                            jcr:primaryType="nt:unstructured"

                                            sling:resourceType="granite/ui/components/foundation/container">

                                            <items jcr:primaryType="nt:unstructured">

                                                <itemPath

                                                    jcr:primaryType="nt:unstructured"

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

                                                    class="foundation-layout-util-maximized-alt long-label"

                                                    fieldLabel="Image"

                                                    name="./itemPath"

                                                    rootPath="/content/dam/latam-portal-agencias/img"/>

                                                <itemText

                                                    jcr:primaryType="nt:unstructured"

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

                                                    class="foundation-layout-util-maximized-alt long-label"

                                                    fieldLabel="Link"

                                                    name="./itemLink"/>

                                            </items>

                                        </column>

                                    </items>

                                </field>

                            </item>

                        </items>

                    </column>

                </items>

            </carousel-component>

        </items>

    </content>

</jcr:root>

1 Accepted Solution

Avatar

Correct answer by
Level 7

Hi,

Please refer the link below. It has an example package (in AEM 6.3) which uses multifield component that has pathfield as one of the fields (granite/ui/components/coral/foundation/form/pathfield) in it.

We've tested the package from below link and it worked fine for us.

https://helpx.adobe.com/experience-manager/using/aem63_htl_repeat_slingmodel.html

Could you please take a look at the example package and give it a try? Please let us know if you still see the same issue. We'll be more than happy to help you!

Regards,

TechAspect Solutions

View solution in original post

5 Replies

Avatar

Level 1

I am also using the same issue with

granite/ui/components/coral/foundation/form/select and

granite/ui/components/foundation/form/checkbox

although the value is getting saved in jcr:content but not showing if open dialog again

Avatar

Correct answer by
Level 7

Hi,

Please refer the link below. It has an example package (in AEM 6.3) which uses multifield component that has pathfield as one of the fields (granite/ui/components/coral/foundation/form/pathfield) in it.

We've tested the package from below link and it worked fine for us.

https://helpx.adobe.com/experience-manager/using/aem63_htl_repeat_slingmodel.html

Could you please take a look at the example package and give it a try? Please let us know if you still see the same issue. We'll be more than happy to help you!

Regards,

TechAspect Solutions

Avatar

Level 3

Hi,

thank you very much for your help.

The problem was that I was trying to use granite/ui/components/coral/foundation inside a structure that was using the

granite/ui/components/foundation

Thank you once more!

Avatar

Level 1

Thanks for your response,

I tried it for checkbox(granite/ui/components/coral/foundation/form/checkbox) and select type but it is not working for me,

and also it is creating a new node for all new add item. Is there any way we can have it with json format in jcr:content itself instead creating new node,

like in jcr:content of page we will have products as properties in multivalued  String[]

{"linktext":"Join this","internalpagelink":"/content/weretails/somelink1","target":true}{"linktext":"Contact Us","internalpagelink":"/content/weretail/contact-us","target":false}{"linktext":"Working weretail","internalpagelink":"/content/weretail/somepage","target":true}

the same thing was working when we were using Classic UI dialog.

Avatar

Level 2

Hi elizabethp60981482

Can you please tell me in detail, how did this issue get resolved for you.
I am using JSON_STORE. select and pathfield are the things, I am facing issues with.

Could you please share the package or the component xml file which you are using.

Thanks,

Sampath