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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Colour Node getting deleted on updating page properties

Avatar

Level 1

Hi,

I have a dropdown of primaryColor and secondaryColor for a page.When I update anything in page properties (like title etc)secondaryColor node is getting deleted from jcr:content of the page so that the Secondarycolor is not taking up in the page.Instead it is taking white colour.

Can someone provide solution for this

0 Replies

Avatar

Level 1

Hey,

I'm using AEM 6.5 SP2.I have an editable template in which I created a dialog with 2 dropdowns.(PrimaryColor and SecondaryColor).

Whenever I try to update something in properties (eg:title), the secondaryColor node is getting deleted in jcr:content and color changes to white.Here is my cq_dialog.xml file

Can somebody help on this?

<blog

                        jcr:primaryType="nt:unstructured"

                        jcr:title="Blog"

                        sling:orderBefore="meta"

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

                                    <pageColor

                                        jcr:primaryType="nt:unstructured"

                                        jcr:title="Color Scheme"

                                        cq:showOnCreate="{Boolean}true"

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

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

                                            <primaryColor

                                                jcr:primaryType="nt:unstructured"

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

                                                fieldLabel="Primary Color"

                                                cq:showOnCreate="{Boolean}true"

                                                renderReadOnly="{Boolean}true"

                                                name="./primaryColor">

                                                <datasource

                                                    jcr:primaryType="nt:unstructured"

                                                    sling:resourceType="/apps/blog/components/dialogs/colors"/>

                                            </primaryColor>

                                            <secondaryColor

                                                jcr:primaryType="nt:unstructured"

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

                                                fieldLabel="Secondary Color"

                                                cq:showOnCreate="{Boolean}true"

                                                renderReadOnly="{Boolean}true"

                                                name="./secondaryColor">

                                            </secondaryColor>

                                        </items>

                                    </pageColor>

                                    </items>

                            </column>

                        </items>

                    </blog>