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

AEM6.3 updating a node deleting child nodes

Avatar

Avatar
Boost 1
Level 1
ravzi
Level 1

Likes

2 likes

Total Posts

3 posts

Correct Reply

1 solution
Top badges earned
Boost 1
Validate 1
Affirm 1
View profile

Avatar
Boost 1
Level 1
ravzi
Level 1

Likes

2 likes

Total Posts

3 posts

Correct Reply

1 solution
Top badges earned
Boost 1
Validate 1
Affirm 1
View profile
ravzi
Level 1

20-01-2018

Hi there,

We have an accordion component which was working fine in AEM6.2 and stopped working after the upgrade to AEM 6.3.1.1

Scenario: User comes to the page

                    1. Drag and drop accordion component and opens a dialog that has a multifield where he can just add titles, for example if he add title 1 and title 2 two nodes will be generated as highlighted in orange below.

                              a) we have modified mutifield to point to granite/ui/components/coral/foundation/form/multifield

                              b) composite = true at multifield node

                              c) acs-commons-nested = NODE_STORE at fieldset node

                    2. On authoring screen now he sees two titles along with two parsys component where user can drag and drop the Rich Text editor.

                    3. Author drops RichText component and nodes highlighted in blue are generated.

                    4. Author again opens the accordion dialog to update title at highlighted in orange at node 1 or 2 and closes the dialog after updating.

                              *** All the nodes underneath 1 and 2 gets deleted after updating the title not sure what is wrong. This code was working perfectly fine in AEM6.2

So it creates a node hierarchy: node highlighted in orange has a title property

page

     |--------bodypar

                    |--------accordion

                                        |-----------accList

                                                            |----------1 - Title1

                                                                      |--------par

                                                                                     |---------component (rich text)

                                                            |----------2 - Title2

                                                                      --------par

                                                                                     |---------component (rich text)

Sightly code: - Code highlighted in red includes parsys so that an author can drag and drop a component.

<sly data-sly-use.accordion=".....AccordionModel"></sly>

<div data-sly-test="${wcmmode.edit && !accordion.itemContentList}" data-emptytext="Accordion content authoring area">Accordion content authoring area</div>

<div data-sly-test="${wcmmode.edit}" data-emptytext="Accordion content authoring area">

     <sly data-sly-test="${!isSingleEntry}">

     <ol data-sly-list="${accordion.itemContentList}">

          <li style="clear:both;">

          <p>Title: ${item.accTitle}</p>

         <sly data-sly-test.resourcePath="${ '{0}/{1}/{2}' @ format=[accordion.accList,itemList.count, accordion.par]}">

               <div data-sly-resource="${resourcePath @resourceType='wcm/foundation/components/parsys'}"></div>

          </sly>

          </li>

     </ol>

</div>

Can someone please help?

View Entire Topic

Avatar

Avatar
Give Back 3
Level 2
ananta99
Level 2

Likes

2 likes

Total Posts

18 posts

Correct Reply

1 solution
Top badges earned
Give Back 3
Validate 1
Give Back
Boost 1
Applaud 5
View profile

Avatar
Give Back 3
Level 2
ananta99
Level 2

Likes

2 likes

Total Posts

18 posts

Correct Reply

1 solution
Top badges earned
Give Back 3
Validate 1
Give Back
Boost 1
Applaud 5
View profile
ananta99
Level 2

05-06-2019

Hi Razvi,

I am trying to do somewhat similar in AEM 6.4. But I noticed that once I add deleteHint (Boolean) = false, I am not able to delete any multifield entry from dialog. In your example, are you able to delete Title1 or Title2 from dialog once you add deleteHint = false ?

Could you also please share your thoughts?

Thank you for your time.

Best Regards,

Ananta