Expand my Community achievements bar.

Multifield not working with multiple tabs and nested multifield

Avatar

Level 2

Here is the cq dialog, which i am using ,

- under first tab, nested muttifield is working fine

- second tab is blank

<?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="EAEM TouchUI Nested Multifield"

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

    helpPath="en/cq/current/wcm/default_components.html#Text">

    <content

        jcr:primaryType="nt:unstructured"

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

        class="cq-dialog-content-page">

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

            <tabs

                jcr:primaryType="nt:unstructured"

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

                active="{Boolean}true"

                rel="cq-siteadmin-admin-properties-tabs">

                <layout

                    jcr:primaryType="nt:unstructured"

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

                    type="nav"/>

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

                    <masterTab

                        jcr:primaryType="nt:unstructured"

                        jcr:title="Master Tab"

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

                                    <fieldset

                                        jcr:primaryType="nt:unstructured"

                                        jcr:title="Sample Dashboard"

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

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

                                                    <dashboard

                                                        jcr:primaryType="nt:unstructured"

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

                                                        fieldDescription="Enter Dashboard name"

                                                        fieldLabel="Dashboard name"

                                                        name="./dashboard"/>

                                                    <countries

                                                        jcr:primaryType="nt:unstructured"

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

                                                        class="full-width"

                                                        fieldDescription="Click '+' to add a new page"

                                                        fieldLabel="Countries">

                                                        <field

                                                            jcr:primaryType="nt:unstructured"

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

                                                            eaem-nested="NODE_STORE"

                                                            name="./countries">

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

                                                                        <country

                                                                            jcr:primaryType="nt:unstructured"

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

                                                                            fieldDescription="Name of Country"

                                                                            fieldLabel="Country Name"

                                                                            name="./country"/>

                                                                        <states

                                                                            jcr:primaryType="nt:unstructured"

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

                                                                            class="full-width"

                                                                            fieldDescription="Click '+' to add a new page"

                                                                            fieldLabel="States">

                                                                            <field

                                                                                jcr:primaryType="nt:unstructured"

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

                                                                                name="./states">

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

                                                                                            <state

                                                                                                jcr:primaryType="nt:unstructured"

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

                                                                                                fieldDescription="Name of State"

                                                                                                fieldLabel="State Name"

                                                                                                name="./state"/>

                                                                                            <districts

                                                                                                jcr:primaryType="nt:unstructured"

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

                                                                                                class="full-width"

                                                                                                fieldDescription="Click '+' to add a new page"

                                                                                                fieldLabel="Districts">

                                                                                                <field

                                                                                                    jcr:primaryType="nt:unstructured"

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

                                                                                                    name="./districts">

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

                                                                                                                <district

                                                                                                                    jcr:primaryType="nt:unstructured"

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

                                                                                                                    fieldDescription="Name of District"

                                                                                                                    fieldLabel="District Name"

                                                                                                                    name="./dictrict"/>

                                                                                                                <mandals

                                                                                                                    jcr:primaryType="nt:unstructured"

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

                                                                                                                    class="full-width"

                                                                                                                    fieldDescription="Click '+' to add a new page"

                                                                                                                    fieldLabel="Mandals">

                                                                                                                    <field

                                                                                                                        jcr:primaryType="nt:unstructured"

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

                                                                                                                        name="./mandals">

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

                                                                                                                                    <mandal

                                                                                                                                        jcr:primaryType="nt:unstructured"

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

                                                                                                                                        fieldDescription="Name of Mandal"

                                                                                                                                        fieldLabel="Mandal Name"

                                                                                                                                        name="./mandal"/>

                                                                                                                                </items>

                                                                                                                            </column>

                                                                                                                        </items>

                                                                                                                    </field>

                                                                                                                </mandals>

                                                                                                            </items>

                                                                                                        </column>

                                                                                                    </items>

                                                                                                </field>

                                                                                            </districts>

                                                                                        </items>

                                                                                    </column>

                                                                                </items>

                                                                            </field>

                                                                        </states>

                                                                    </items>

                                                                </column>

                                                            </items>

                                                        </field>

                                                    </countries>

                                                </items>

                                            </column>

                                        </items>

                                    </fieldset>

                                </items>

                            </column>

                        </items>

                    </masterTab>

                    <customerTab

                        jcr:primaryType="nt:unstructured"

                        jcr:title="Premier Tab"

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

                                    <fieldset

                                        jcr:primaryType="nt:unstructured"

                                        jcr:title="Sample Dashboard"

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

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

                                                    <dashboard

                                                        jcr:primaryType="nt:unstructured"

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

                                                        fieldDescription="Enter Dashboard name"

                                                        fieldLabel="Dashboard name"

                                                        name="./premier_dashboard"/>

                                                </items>

                                            </column>

                                        </items>

                                    </fieldset>

                                </items>

                            </column>

                        </items>

                    </customerTab>

                </items>

            </tabs>

        </items>

    </content>

</jcr:root>

Any suggestions please 

5 Replies

Avatar

Level 2

Thanks Scott and Prince for the reply,

@Scott,

What I need to get is:

1) Nested multi-multi-filed storing the entered data as Child Nodes. and use this in other tabs as well

For examples, Master tab has nested-multi-mutli field

1281417_pastedImage_1.png

Premier tab has nested-nested multifield

1281418_pastedImage_2.png

I want to store this as child nodes

Yes I was using the post, which you mentioned http://experience-aem.blogspot.com/2017/06/aem-63-touch-ui-nested-coral2-composite-multifi eld.html​

This post works fine for one tab and it stores as child nodes, for multiple tabs, it does not even display dailog

@Prince,

When I change sling:resourceType from granite/ui/components/foundation/form/multifield

to /libs/granite/ui/components/coral/foundation/form/multifield

It does displays nested-multi-multifid in all tabs but does not store as child nodes

My question is kind of mixing both into one, nested-multi-multifield store as child nodes and display in all tabs

is there any way achieve that?

Avatar

Community Advisor

Hi,

Please refer the link which scott suggested. Also if you are getting error like when you are re-opening the dialog and content is holding by the dialog.

then please change your multifiled sling:resourceType from granite to coral.

We solved this issue by the same.

Regards,
Prince

Avatar

Level 2

Hi kradhakrishna

Use sling:resourceType as "granite/ui/components/coral/foundation/form/multifield" for inner Multifields.

Here is the sample dialog xml.

<?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="Header Dialog"

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

            <tab1

                jcr:primaryType="nt:unstructured"

                jcr:title="Logo Tab"

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

                <layout

                    jcr:primaryType="nt:unstructured"

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

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

                    <columns

                        jcr:primaryType="nt:unstructured"

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

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

                            <logoImage1

                                jcr:primaryType="nt:unstructured"

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

                                fieldDescription="Enter logo 1 Image Path. Mandatory"

                                fieldLabel="Logo 1"

                                name="./logoImage1"

                                required="{Boolean}true"

                                rootPath="/content/dam/mercer-consumer"/>

                            <logoLink1

                                jcr:primaryType="nt:unstructured"

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

                                fieldDescription="Target link for logo 1. Must start with http:// or https://."

                                fieldLabel="Provide the link for logo 1"

                                name="./logoLink1"

                                rootPath="/content/mercer-consumer"/>

                            <altText1

                                jcr:primaryType="nt:unstructured"

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

                                allowBlank="{Boolean}false"

                                fieldDescription="Enter Logo Alt Text [Max - 30]"

                                fieldLabel="Logo1 Alt Text"

                                key="altText1"

                                maxLength="30"

                                name="./altText1"/>

                            <newWindowLogo1

                                jcr:primaryType="nt:unstructured"

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

                                fieldDescription="Check to open link in new tab"

                                key="newWindowLogo1"

                                name="./newWindowLogo1"

                                text="Open logo 1 in New Window?"

                                value="true"/>

                            <newwindowlogo1Type

                                jcr:primaryType="nt:unstructured"

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

                                name="./newWindowLogo1@TypeHint"

                                value="Boolean"/>

                            <logoImage2

                                jcr:primaryType="nt:unstructured"

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

                                fieldDescription="Enter logo 2 Image Path. Optional"

                                fieldLabel="Logo 2"

                                name="./logoImage2"

                                rootPath="/content/dam/mercer-consumer"/>

                            <logoLink2

                                jcr:primaryType="nt:unstructured"

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

                                fieldDescription="Target link for logo 2. Must start with http:// or https://"

                                fieldLabel="Provide the link for logo 2"

                                name="./logoLink2"

                                rootPath="/content/mercer-consumer"/>

                            <altText2

                                jcr:primaryType="nt:unstructured"

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

                                allowBlank="{Boolean}false"

                                fieldDescription="Enter Logo Alt Text [Max - 30]"

                                fieldLabel="Logo2 Alt Text"

                                key="altText2"

                                maxLength="30"

                                name="./altText2"/>

                            <newWindowLogo2

                                jcr:primaryType="nt:unstructured"

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

                                fieldDescription="Check to open link in new tab"

                                key="newWindowLogo2"

                                name="./newWindowLogo2"

                                text="Open logo 2 in New Window?"

                                value="true"/>

                            <newwindowlogo2Type

                                jcr:primaryType="nt:unstructured"

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

                                name="./newWindowLogo2@TypeHint"/>

                        </items>

                    </columns>

                </items>

            </tab1>

            <tab2

                jcr:primaryType="nt:unstructured"

                jcr:title="Top Links Tab"

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

                <layout

                    jcr:primaryType="nt:unstructured"

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

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

                    <columns

                        jcr:primaryType="nt:unstructured"

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

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

                            <linkTitle1

                                jcr:primaryType="nt:unstructured"

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

                                fieldDescription="This is Link Title 1. Mandatory. Max Limit - 30"

                                fieldLabel="Enter Link Title 1"

                                maxlength="30"

                                name="./linkTitle1"

                                required="{Boolean}true"/>

                            <linkUrl1

                                jcr:primaryType="nt:unstructured"

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

                                fieldDescription="This is link Url field 1. Must start with http:// or https://. Mandatory"

                                fieldLabel="Enter link Url 1"

                                name="./linkUrl1"

                                required="{Boolean}true"

                                rootPath="/content/mercer-consumer"/>

                            <newWindowLink1

                                jcr:primaryType="nt:unstructured"

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

                                fieldDescription="Check to open link in new tab"

                                key="newWindowLink1"

                                name="./newWindowLink1"

                                text="Open link 1 in New Window?"

                                value="true"/>

                            <newwindowlink1Type

                                jcr:primaryType="nt:unstructured"

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

                                name="./newWindowLink1@TypeHint"

                                value="Boolean"/>

                            <linkTitle2

                                jcr:primaryType="nt:unstructured"

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

                                fieldDescription="This is link Title 2. Optional"

                                fieldLabel="Enter Link Title 2"

                                maxlength="30"

                                name="./linkTitle2"/>

                            <linkUrl2

                                jcr:primaryType="nt:unstructured"

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

                                fieldDescription="This is link Url field 2. Must start with http:// or https://. Mandatory"

                                fieldLabel="Enter link Url 2"

                                name="./linkUrl2"

                                rootPath="/content/mercer-consumer"/>

                            <newWindowLink2

                                jcr:primaryType="nt:unstructured"

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

                                fieldDescription="Check to open link in new tab"

                                key="newWindowLink2"

                                name="./newWindowLink2"

                                text="Open link 2 in New Window?"

                                value="true"/>

                            <newwindowlink2Type

                                jcr:primaryType="nt:unstructured"

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

                                name="./newWindowLink2@TypeHint"

                                value="Boolean"/>

                        </items>

                    </columns>

                </items>

            </tab2>

            <tab3

                jcr:primaryType="nt:unstructured"

                jcr:title="Menu 1"

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

                <layout

                    jcr:primaryType="nt:unstructured"

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

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

                    <columns

                        jcr:primaryType="nt:unstructured"

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

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

                            <menuLinkTitle

                                jcr:primaryType="nt:unstructured"

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

                                fieldDescription="This is Menu Title. Mandatory. Max Limit - 30"

                                fieldLabel="Enter Menu Link Title"

                                key="menuLinkTitle1"

                                maxlength="30"

                                name="./menuLinkTitle1"

                                required="{Boolean}true"/>

                            <menuLinkUrl

                                jcr:primaryType="nt:unstructured"

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

                                fieldDescription="This is Menu Link. Must start with http:// or https://. Mandatory"

                                fieldLabel="Enter Menu Link Url"

                                key="menuLinkUrl1"

                                name="./menuLinkUrl1"

                                required="{Boolean}true"

                                rootPath="/content/mercer-consumer"/>

                            <menuNewWindow

                                jcr:primaryType="nt:unstructured"

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

                                fieldDescription="Check to open link in new tab"

                                key="menuNewWindow1"

                                name="./menuNewWindow1"

                                text="Open link in New Window?"/>

                            <menuNewWindowType

                                jcr:primaryType="nt:unstructured"

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

                                name="./menuNewWindow1@TypeHint"/>

                            <menuSubLinks

                                jcr:primaryType="nt:unstructured"

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

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

                                fieldLabel="Configure Sub Menu"

                                max="{Long}5">

                                <field

                                    jcr:primaryType="nt:unstructured"

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

                                    acs-commons-nested=""

                                    key="links1"

                                    name="./links1">

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

                                                <linkTitle

                                                    jcr:primaryType="nt:unstructured"

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

                                                    fieldDescription="This is Sub Menu Title. Mandatory. Max Limit - 30"

                                                    fieldLabel="Enter Sub Menu Title"

                                                    key="linkTitle"

                                                    maxlength="30"

                                                    name="./linkTitle"

                                                    required="{Boolean}true"/>

                                                <linkUrl

                                                    jcr:primaryType="nt:unstructured"

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

                                                    fieldDescription="This is Sub Menu link. Must start with http:// or https://. Mandatory"

                                                    fieldLabel="Enter Sub Menu Link"

                                                    key="linkUrl"

                                                    name="./linkUrl"

                                                    required="{Boolean}true"

                                                    rootPath="/content/mercer-consumer"/>

                                                <subMenuNewWindow

                                                    jcr:primaryType="nt:unstructured"

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

                                                    fieldDescription="Check to open link in new tab"

                                                    name="./linkTarget"

                                                    text="Open link in New Window?"/>

                                                <submenuNewWindowType

                                                    jcr:primaryType="nt:unstructured"

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

                                                    name="./linkTarget@TypeHint"/>

                                                <subLinks

                                                    jcr:primaryType="nt:unstructured"

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

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

                                                    fieldLabel="Configure Sub Links"

                                                    max="{Long}5">

                                                    <field

                                                        jcr:primaryType="nt:unstructured"

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

                                                        acs-commons-nested=""

                                                        key="subLinks"

                                                        name="./subLinks">

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

                                                                    <subLinkTitle

                                                                        jcr:primaryType="nt:unstructured"

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

                                                                        fieldDescription="This is Sub Link Title. Mandatory. Max Limit - 30"

                                                                        fieldLabel="Enter Sub Link Title"

                                                                        key="linkTitle"

                                                                        maxlength="30"

                                                                        name="./linkTitle"

                                                                        required="{Boolean}true"/>

                                                                    <subLinkUrl

                                                                        jcr:primaryType="nt:unstructured"

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

                                                                        fieldDescription="This is Sub Link Url. Must start with http:// or https://. Mandatory"

                                                                        fieldLabel="Enter Sub Link Url"

                                                                        key="linkUrl"

                                                                        name="./linkUrl"

                                                                        required="{Boolean}true"

                                                                        rootPath="/content/mercer-consumer"/>

                                                                    <subLinkNewWindow

                                                                        jcr:primaryType="nt:unstructured"

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

                                                                        fieldDescription="Check to open link in new tab"

                                                                        name="./linkTarget"

                                                                        text="Open link in New Window?"/>

                                                                    <sublinknewwindowType

                                                                        jcr:primaryType="nt:unstructured"

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

                                                                        name="./linkTarget@TypeHint"/>

                                                                </items>

                                                            </column>

                                                        </items>

                                                    </field>

                                                </subLinks>

                                            </items>

                                        </column>

                                    </items>

                                </field>

                            </menuSubLinks>

                        </items>

                    </columns>

                </items>

            </tab3>

            <tab4

                jcr:primaryType="nt:unstructured"

                jcr:title="Menu 2"

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

                <layout

                    jcr:primaryType="nt:unstructured"

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

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

                    <columns

                        jcr:primaryType="nt:unstructured"

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

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

                            <menuLinkTitle

                                jcr:primaryType="nt:unstructured"

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

                                fieldDescription="This is Menu Title. Mandatory. Max Limit - 30"

                                fieldLabel="Enter Menu Link Title"

                                key="menuLinkTitle2"

                                maxlength="30"

                                name="./menuLinkTitle2"

                                required="{Boolean}true"/>

                            <menuLinkUrl

                                jcr:primaryType="nt:unstructured"

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

                                fieldDescription="This is Menu Link. Must start with http:// or https://. Mandatory"

                                fieldLabel="Enter Menu Link Url"

                                key="menuLinkUrl2"

                                name="./menuLinkUrl2"

                                required="{Boolean}true"

                                rootPath="/content/mercer-consumer"/>

                            <menuNewWindow

                                jcr:primaryType="nt:unstructured"

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

                                fieldDescription="Check to open link in new tab"

                                key="menuNewWindow2"

                                name="./menuNewWindow2"

                                text="Open link in New Window?"/>

                            <menuNewWindowType

                                jcr:primaryType="nt:unstructured"

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

                                name="./menuNewWindow2@TypeHint"/>

                            <menuSubLinks

                                jcr:primaryType="nt:unstructured"

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

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

                                fieldLabel="Configure Sub Menu"

                                max="{Long}5">

                                <field

                                    jcr:primaryType="nt:unstructured"

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

                                    acs-commons-nested=""

                                    key="links2"

                                    name="./links2">

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

                                                <linkTitle

                                                    jcr:primaryType="nt:unstructured"

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

                                                    fieldDescription="This is Sub Menu Title. Mandatory. Max Limit - 30"

                                                    fieldLabel="Enter Sub Menu Title"

                                                    key="linkTitle"

                                                    maxlength="30"

                                                    name="./linkTitle"

                                                    required="{Boolean}true"/>

                                                <linkUrl

                                                    jcr:primaryType="nt:unstructured"

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

                                                    fieldDescription="This is Sub Menu link. Must start with http:// or https://. Mandatory"

                                                    fieldLabel="Enter Sub Menu Link"

                                                    key="linkUrl"

                                                    name="./linkUrl"

                                                    required="{Boolean}true"

                                                    rootPath="/content/mercer-consumer"/>

                                                <subMenuNewWindow

                                                    jcr:primaryType="nt:unstructured"

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

                                                    fieldDescription="Check to open link in new tab"

                                                    key="linkTarget"

                                                    name="./linkTarget"

                                                    text="Open link in New Window?"/>

                                                <submenuNewWindowType

                                                    jcr:primaryType="nt:unstructured"

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

                                                    name="./linkTarget@TypeHint"/>

                                                <subLinks

                                                    jcr:primaryType="nt:unstructured"

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

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

                                                    fieldLabel="Configure Sub Links"

                                                    max="{Long}5">

                                                    <field

                                                        jcr:primaryType="nt:unstructured"

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

                                                        acs-commons-nested=""

                                                        key="subLinks"

                                                        name="./subLinks">

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

                                                                    <subLinkTitle

                                                                        jcr:primaryType="nt:unstructured"

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

                                                                        fieldDescription="This is Sub Link Title. Mandatory. Max Limit - 30"

                                                                        fieldLabel="Enter Sub Link Title"

                                                                        key="linkTitle"

                                                                        maxlength="30"

                                                                        name="./linkTitle"

                                                                        required="{Boolean}true"/>

                                                                    <subLinkUrl

                                                                        jcr:primaryType="nt:unstructured"

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

                                                                        fieldDescription="This is Sub Link Url. Must start with http:// or https://. Mandatory"

                                                                        fieldLabel="Enter Sub Link Url"

                                                                        key="linkUrl"

                                                                        name="./linkUrl"

                                                                        required="{Boolean}true"

                                                                        rootPath="/content/mercer-consumer"/>

                                                                    <subLinkNewWindow

                                                                        jcr:primaryType="nt:unstructured"

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

                                                                        fieldDescription="Check to open link in new tab"

                                                                        key="linkTarget"

                                                                        name="./linkTarget"

                                                                        text="Open link in New Window?"/>

                                                                    <sublinkNewWindowType

                                                                        jcr:primaryType="nt:unstructured"

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

                                                                        name="./linkTarget@TypeHint"/>

                                                                </items>

                                                            </column>

                                                        </items>

                                                    </field>

                                                </subLinks>

                                            </items>

                                        </column>

                                    </items>

                                </field>

                            </menuSubLinks>

                        </items>

                    </columns>

                </items>

            </tab4>

            <tab5

                jcr:primaryType="nt:unstructured"

                jcr:title="Menu 3"

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

                <layout

                    jcr:primaryType="nt:unstructured"

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

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

                    <columns

                        jcr:primaryType="nt:unstructured"

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

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

                            <menuLinkTitle

                                jcr:primaryType="nt:unstructured"

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

                                fieldDescription="This is Menu Title. Mandatory. Max Limit - 30"

                                fieldLabel="Enter Menu Link Title"

                                key="menuLinkTitle3"

                                maxlength="30"

                                name="./menuLinkTitle3"

                                required="{Boolean}true"/>

                            <menuLinkUrl

                                jcr:primaryType="nt:unstructured"

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

                                fieldDescription="This is Menu Link. Must start with http:// or https://. Mandatory"

                                fieldLabel="Enter Menu Link Url"

                                key="menuLinkUrl3"

                                name="./menuLinkUrl3"

                                required="{Boolean}true"

                                rootPath="/content/mercer-consumer"/>

                            <menuNewWindow

                                jcr:primaryType="nt:unstructured"

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

                                fieldDescription="Check to open link in new tab"

                                key="menuNewWindow3"

                                name="./menuNewWindow3"

                                text="Open link in New Window?"/>

                            <menuNewWindowType

                                jcr:primaryType="nt:unstructured"

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

                                name="./menuNewWindow3@TypeHint"/>

                            <menuSubLinks

                                jcr:primaryType="nt:unstructured"

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

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

                                fieldLabel="Configure Sub Menu"

                                max="{Long}5">

                                <field

                                    jcr:primaryType="nt:unstructured"

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

                                    acs-commons-nested=""

                                    key="links3"

                                    name="./links3">

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

                                                <linkTitle

                                                    jcr:primaryType="nt:unstructured"

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

                                                    fieldDescription="This is Sub Menu Title. Mandatory. Max Limit - 30"

                                                    fieldLabel="Enter Sub Menu Title"

                                                    key="linkTitle"

                                                    maxlength="30"

                                                    name="./linkTitle"

                                                    required="{Boolean}true"/>

                                                <linkUrl

                                                    jcr:primaryType="nt:unstructured"

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

                                                    fieldDescription="This is Sub Menu link. Must start with http:// or https://. Mandatory"

                                                    fieldLabel="Enter Sub Menu Link"

                                                    key="linkUrl"

                                                    name="./linkUrl"

                                                    required="{Boolean}true"

                                                    rootPath="/content/mercer-consumer"/>

                                                <subMenuNewWindow

                                                    jcr:primaryType="nt:unstructured"

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

                                                    fieldDescription="Check to open link in new tab"

                                                    key="linkTarget"

                                                    name="./linkTarget"

                                                    text="Open link in New Window?"/>

                                                <submenuNewWindowType

                                                    jcr:primaryType="nt:unstructured"

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

                                                    name="./linkTarget@TypeHint"/>

                                                <subLinks

                                                    jcr:primaryType="nt:unstructured"

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

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

                                                    fieldLabel="Configure Sub Links"

                                                    max="{Long}5">

                                                    <field

                                                        jcr:primaryType="nt:unstructured"

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

                                                        acs-commons-nested=""

                                                        key="subLinks"

                                                        name="./subLinks">

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

                                                                    <subLinkTitle

                                                                        jcr:primaryType="nt:unstructured"

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

                                                                        fieldDescription="This is Sub Link Title. Mandatory. Max Limit - 30"

                                                                        fieldLabel="Enter Sub Link Title"

                                                                        key="linkTitle"

                                                                        maxlength="30"

                                                                        name="./linkTitle"

                                                                        required="{Boolean}true"/>

                                                                    <subLinkUrl

                                                                        jcr:primaryType="nt:unstructured"

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

                                                                        fieldDescription="This is Sub Link Url. Must start with http:// or https://. Mandatory"

                                                                        fieldLabel="Enter Sub Link Url"

                                                                        key="linkUrl"

                                                                        name="./linkUrl"

                                                                        required="{Boolean}true"

                                                                        rootPath="/content/mercer-consumer"/>

                                                                    <subLinkNewWindow

                                                                        jcr:primaryType="nt:unstructured"

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

                                                                        fieldDescription="Check to open link in new tab"

                                                                        key="linkTarget"

                                                                        name="./linkTarget"

                                                                        text="Open link in New Window?"/>

                                                                    <sublinkNewWindowType

                                                                        jcr:primaryType="nt:unstructured"

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

                                                                        name="./linkTarget@TypeHint"/>

                                                                </items>

                                                            </column>

                                                        </items>

                                                    </field>

                                                </subLinks>

                                            </items>

                                        </column>

                                    </items>

                                </field>

                            </menuSubLinks>

                        </items>

                    </columns>

                </items>

            </tab5>

        </items>

    </content>

</jcr:root>

Thanks,

Amogh

Avatar

Level 1

Does anyone has solution for this. I tried by changing sling:resourceType as "granite/ui/components/coral/foundation/form/multifield" for inner Multifields. Even though tab works, but it breaks mutiflied. It doesn't save the value properly