Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

AEM - Dialog (classic UI)

Avatar

Level 1

Hi guys,

We have a requirement , in which we want to open a dialog of a component in a page through the  dialog of the component which is lying in some other page. We are able to open the component dialog which is present on the same page on the click of a button in a dialog , but not able to open the dialog of component which is available on the different page.

 

We have tried the below code, when we try to give the hard code exact path of the component of different page in openComponentPropertiesDialog(' Hard code Path (/content/abc/xyz/home/jcr:content/parsys) ')

it returns undefined.

 

<input type=button onClick="openComponentPropertiesDialog('<%= currentNode.getPath() %>')" value="Open Component Dialog"/>

 <script>
function openComponentPropertiesDialog(path){
        var editRollOver = CQ.utils.WCM.getEditables()[path];
        CQ.wcm.EditBase.showDialog(editRollOver, CQ.wcm.EditBase.EDIT);
</script>

 

 

Please provide solution regarding this, will be of great help.

 

 

Thanks

2 Replies

Avatar

Level 10

Can you explain you use case, what you are trying to achieve?

Avatar

Level 1

We are trying to get  all the editable components of the content page 2 from the Button whIch Is available In content page 1.