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

Avoid Override when save cq Dialog

Avatar

Avatar
Validate 1
Level 2
maynors2427659
Level 2

Likes

0 likes

Total Posts

12 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
maynors2427659
Level 2

Likes

0 likes

Total Posts

12 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Affirm 1
View profile
maynors2427659
Level 2

04-09-2018

I am developing a TABS component, in the cq dialog I have a multifield where you can add the TAB title, then in the HTL it will create a responsive grid inside the item# path of the multifield (as shown below)

rg.PNG

The problem is when I try to do anything later on the cq dialog, I go and for example, I add a new Tab, and somehow the responsivegrid(tabcontent) is gone for all the tabs, I am guessing that the cq dialog overrides the items of the multifield everytime you close it.

I need to prevent this "tabcontent" from being deleted, how can I do that?

HTL:

<sly data-sly-list.tabItem="${tabs.items}">

   <section data-title="${tabItem.title}" class="cmp-tabs__tabSection
  ${tabItemList.first ? 'is-active' : ''} ${wcmmode.edit ? 'author' : ''}"
   id="${uniqueElemId.uniqueId}-tab-${tabItemList.index}-tabsection" role="tabpanel" aria-labelledby="${uniqueElemId.uniqueId}-tab-${tabItemList.index}"
   aria-hidden="${tabItemList.first ? 'false' : 'true'}"
   aria-selected="${tabItemList.first ? 'true' : 'false'}">

   <div class="tabContent" data-sly-resource="${'tabs/item{0}/tabcontent' @ format=tabItemList.index,
  resourceType='wcm/foundation/components/responsivegrid'}"></div>

   </section>

</sly>

CQ DIALOG

<tabs
   jcr:primaryType="nt:unstructured"
   sling:resourceType="granite/ui/components/coral/foundation/form/multifield"
   composite="{Boolean}true"
   fieldLabel="Tabs">

   <field
   jcr:primaryType="nt:unstructured"
   sling:resourceType="granite/ui/components/coral/foundation/container"
   name="./tabs">

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

   <title
   jcr:primaryType="nt:unstructured"
   sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
   fieldDescription="Enter the tab title"
   fieldLabel="Title"
   name="./title"
   required="{Boolean}true"/>

   </items>

   </field>

</tabs>

Replies

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,408 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,408 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

04-09-2018

Can you post a video of your component so we can understand how its functioning.  I am not completely sure what you mean by: "

I need to prevent this "tabcontent" from being deleted, how can I do that?"

See this article that works with Multifield and Sling Models - i am seeing no issue here working with Multifield -- Adobe Experience Manager Help | Creating a HTL Repeating Data Set 6.4 Component that uses Sling Mode...

Avatar

Avatar
Validate 1
Level 2
maynors2427659
Level 2

Likes

0 likes

Total Posts

12 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
maynors2427659
Level 2

Likes

0 likes

Total Posts

12 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Affirm 1
View profile
maynors2427659
Level 2

04-09-2018

Thanks for answering, here is a video with current behavior, I tried setting the flag deleteHint to false  to the multifield, keeps the content but the problem is when I try to delete something, does not delete anything.

Avatar

Avatar
Validate 1
Level 2
maynors2427659
Level 2

Likes

0 likes

Total Posts

12 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
maynors2427659
Level 2

Likes

0 likes

Total Posts

12 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Affirm 1
View profile
maynors2427659
Level 2

05-09-2018

HTL CODE:

<sly data-sly-list.tabItem="${tabs.items}">

   <section data-title="${tabItem.title}" >

        <div class="tabContent" data-sly-resource="${'/tabs/tab{0}/tabcontent' @ format=tabItem.index,
  resourceType='wcm/foundation/components/responsivegrid'}"></div>

   </section>

</sly>

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,408 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,408 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

05-09-2018

Can you wrap up your example into a package and place on Google drive so community can download it and use it. We may be able to find the solution with the package.  I want to test this.

Avatar

Avatar
Validate 1
Level 2
maynors2427659
Level 2

Likes

0 likes

Total Posts

12 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
maynors2427659
Level 2

Likes

0 likes

Total Posts

12 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Affirm 1
View profile
maynors2427659
Level 2

05-09-2018

Sure, HERE is the code.

Avatar

Avatar
Validate 1
Level 2
maynors2427659
Level 2

Likes

0 likes

Total Posts

12 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
maynors2427659
Level 2

Likes

0 likes

Total Posts

12 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Affirm 1
View profile
maynors2427659
Level 2

12-09-2018

Hi, any ideas about this? Or maybe it's a bug?

Avatar

Avatar
Level 1
与伦吴69010423
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile

Avatar
Level 1
与伦吴69010423
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile
与伦吴69010423
Level 1

29-01-2019

I have the same problem as you. Have you solved your problem? If so, can you tell me how.

Avatar

Avatar
Validate 1
Level 2
maynors2427659
Level 2

Likes

0 likes

Total Posts

12 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
maynors2427659
Level 2

Likes

0 likes

Total Posts

12 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Affirm 1
View profile
maynors2427659
Level 2

01-02-2019

Hi, no i was unable, I saved the responsive grid out of the tabcontent and associated it with an id. That's the only way I found. However the problem with this approach is if you delete the tabcontent then the responsive grid associated with it won't be deleted.

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

06-06-2019

Hi maynors2427659​,

I am facing the same problem. Did we get any solution to this problem?

Thank you for your time.

Best Regards,

Ananta