Parent child component dialog value dynamically AEM 6.4 | Community
Skip to main content
February 16, 2023
Solved

Parent child component dialog value dynamically AEM 6.4

  • February 16, 2023
  • 4 replies
  • 2532 views

Hi Team,

 

 I have a requirement where i want to use parent component dialog value in the child component dialog dynamically. 

 

Suppose i have text dialog in parent component, once i provide the text value that should automatically populate in child component dialog. 

 

any clue how to do this? 

 

Regards

Nishant 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Prince_Shivhare

Hey,

While saving the content in parent node, can't you create a child node and save the same values with the property name of child component?

Let's say - once you open a parent component dialog and save the values. so in the getter or some other way, you can take those values and create a child node structure having property resourcetype -> which is nothing but you child component path and properties of that child component dialog.

 

so once you'll open the dialog, you will see the values.

 

Thanks!

4 replies

Prince_Shivhare
Community Advisor
Community Advisor
February 16, 2023

Hey,

I think you should not use the term "automatically populate in child component dialog". other way, you can do this by sling models by fetching the value and set it to child component property.

so once you will open the dialog, you'll find the value associated with it.

 

Cheers!

Manisha_Mirchandani
Level 2
February 16, 2023
Nishant25Author
February 16, 2023

Thanks All for quick reply, 

Let me help with the scenario. 

I have 2 component A(Parent) and B (Child) , Parent component having two dialog field suppose username and password text type . Now once Author update username and password, Child component should pick these two-field value automatically in dialog. Frontend prospective what will be the approach on this . 

Prince_Shivhare
Community Advisor
Prince_ShivhareCommunity AdvisorAccepted solution
Community Advisor
February 16, 2023

Hey,

While saving the content in parent node, can't you create a child node and save the same values with the property name of child component?

Let's say - once you open a parent component dialog and save the values. so in the getter or some other way, you can take those values and create a child node structure having property resourcetype -> which is nothing but you child component path and properties of that child component dialog.

 

so once you'll open the dialog, you will see the values.

 

Thanks!