Введенные данные некорректно структурированы при использовании многополевого диалога в AEM - PullRequest
0 голосов
/ 18 июня 2020

Ниже приведен фрагмент моего диалога. Я пытаюсь реализовать многополевой диалог.

<tab
    jcr:primaryType="nt:unstructured"
    sling:resourceType="granite/ui/components/foundation/container">
<items
        jcr:primaryType="nt:unstructured">
    <usersubmenudetails
            jcr:primaryType="nt:unstructured"
            sling:resourceType="granite/ui/components/foundation/form/multifield"
            class="full-width"
            fieldDescription="Click 'Add field' to add new links to Content Block 1"
            fieldLabel="Content block 1 links">
        <field
                jcr:primaryType="nt:unstructured"
                sling:resourceType="granite/ui/components/foundation/form/fieldset"
                acs-commons-nested=""
                name="./contentBlock1Links">
            <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">
                        <label
                                jcr:primaryType="nt:unstructured"
                                sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
                                fieldDescription="Enter a label for the Nav link"
                                fieldLabel="Label"
                                name="./ollinklabel"/>
                        <link
                                jcr:primaryType="nt:unstructured"
                                sling:resourceType="granite/ui/components/coral/foundation/form/pathbrowser"
                                fieldDescription="Provide a navigation link."
                                fieldLabel="Link"
                                name="./ollinklink"
                                rootPath="/content"/>
                    </items>
                </column>
            </items>
        </field>
    </usersubmenudetails>
</items>
</tab>

Диалог работает нормально, и я могу ввести требуемые значения в структуру узла содержимого страницы -

enter image description here

Проблема в том, что я хочу, чтобы данные хранились вот так -

enter image description here

Как мне этого добиться ?

1 Ответ

0 голосов
/ 18 июня 2020

гранит: отсутствует узел данных. Вот обновленный диалог

<tab
        jcr:primaryType="nt:unstructured"
        sling:resourceType="granite/ui/components/foundation/container">
            <items jcr:primaryType="nt:unstructured">
                <usersubmenudetails
                    cq:showOnCreate="{Boolean}true"
                    jcr:primaryType="nt:unstructured"
                    sling:resourceType="granite/ui/components/coral/foundation/form/multifield"
                    class="full-width"
                    fieldDescription="Click 'Add field' to add new links to Content Block 1"
                    fieldLabel="Content block 1 links">
                    <field
                        jcr:primaryType="nt:unstructured"
                        sling:resourceType="granite/ui/components/coral/foundation/form/fieldset"
                        name="./contentBlock1Links">
                        <items jcr:primaryType="nt:unstructured">
                            <column
                                jcr:primaryType="nt:unstructured"
                                sling:resourceType="granite/ui/components/coral/foundation/container">
                                <items jcr:primaryType="nt:unstructured">
                                    <label
                                        jcr:primaryType="nt:unstructured"
                                        sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
                                        fieldDescription="Enter a label for the Nav link"
                                        fieldLabel="Label"
                                        name="./ollinklabel"/>
                                    <link
                                        jcr:primaryType="nt:unstructured"
                                        sling:resourceType="granite/ui/components/coral/foundation/form/pathbrowser"
                                        fieldDescription="Provide a navigation link."
                                        fieldLabel="link"
                                        name="./ollinklink"
                                        rootPath="/content"/>
                                </items>
                            </column>
                        </items>
                        <granite:data
                            jcr:primaryType="nt:unstructured"
                            name="./contentBlock1Links"
                            acs-commons-nested="JSON_STORE"/>
                    </field>
                </usersubmenudetails>
            </items>
    </tab>

Попробуйте.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...