Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

How to pre-populate dynamic data in composite multifield ?

Avatar

Avatar
Validate 1
Level 1
nagasreenug4839
Level 1

Likes

0 likes

Total Posts

12 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back
View profile

Avatar
Validate 1
Level 1
nagasreenug4839
Level 1

Likes

0 likes

Total Posts

12 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back
View profile
nagasreenug4839
Level 1

03-09-2018

Hi All,

I need to pre-populate data into composite multi field by reading data from OSGI configuration file.This data should update based on drop down selection.

I am able to read the data from configuration file in JS,But even when i assigned data to fields ,while rendering time fields are showing as blank.

Replies

Avatar

Avatar
Boost 50
Level 6
Techaspect_Solu
Level 6

Likes

63 likes

Total Posts

150 posts

Correct Reply

79 solutions
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 25
Boost 10
View profile

Avatar
Boost 50
Level 6
Techaspect_Solu
Level 6

Likes

63 likes

Total Posts

150 posts

Correct Reply

79 solutions
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 25
Boost 10
View profile
Techaspect_Solu
Level 6

03-09-2018

Hi,

We could implement your use case by following the below helpx article:

Adobe Experience Manager Help | Dynamically updating Adobe Experience Manager TouchUI Dialog Select ...

Below 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="Products FAQ 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">

            <product-section

                jcr:primaryType="nt:unstructured"

                jcr:title="Products"

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

                    <layout

                        jcr:primaryType="nt:unstructured"

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

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

                            <multifield

                                jcr:primaryType="nt:unstructured"

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

                                class="full-width"

                                fieldDescription="Click '+' to add a new page and link">

                                <field

                                    jcr:primaryType="nt:unstructured"

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

                                    eaem-nested=""

                                    name="./items">

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

                                                <question

                                                    jcr:primaryType="nt:unstructured"

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

                                                    fieldLabel="Question"

                                                    name="./question"/>

                                                <answer

                                                    jcr:primaryType="nt:unstructured"

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

                                                    fieldLabel="Answer"

                                                    name="./answer"/>

                                                <products

                                                    jcr:primaryType="nt:unstructured"

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

                                                    defaultValue="Select a product"

                                                    fieldLabel="Select a product"

                                                    multiple="{Boolean}false"

                                                    name="./product">

                                                    <datasource

                                                        jcr:primaryType="nt:unstructured"

                                                        sling:resourceType="/apps/myproject/datasource/products"

                                                        addNone="{Boolean}true"/>

                                                </products>

                                            </items>

                                        </column>

                                    </items>

                                </field>

                            </multifield>

                        </items>

                    </layout>

                </items>

            </product-section>

        </items>

    </content>

</jcr:root>

Please find the screen-shots of sample OSGi configuration and dynamic drop-down inside a multi-field below:

OSGi configuration:

osgi-config.PNG

Sample dynamic drop-down inside multi-field:

dynamic-dropdown-in-mf.PNG

We hope this helps!

Regards,

TechAspect Solutions

Avatar

Avatar
Validate 1
Level 1
nagasreenug4839
Level 1

Likes

0 likes

Total Posts

12 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back
View profile

Avatar
Validate 1
Level 1
nagasreenug4839
Level 1

Likes

0 likes

Total Posts

12 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back
View profile
nagasreenug4839
Level 1

03-09-2018

Thank you for reply.

My use case is not related to dynamic drop down implementation.

In my use case i am having OSGI configuration having string array content,Those data i need to pre-populate in multi-field (having textfields)  ,These text fields data would need to update when user change the drop down options.

1563397_pastedImage_0.png