


Hi All,
Suppose in my page properties I have some custom tabs and there is a textfield in it.
In my component dialog, there is a text field which should be pre-populated with values from the above mentioned field.
Tried with the below listener functions, but not working properly.
function(box,val){var dlg = box.findParentByType('dialog');var sel = dlg.getField('./pagepropfield').getValue();var field = dlg.getField('./componentdialogfield');field.setValue(sel);}
function(comp) { var dlg = comp.findParentByType('dialog'); var sel = dlg.getField('./pagepropfieldl').getValue();alert(val); var field = dlg.getField('./componentdialogfield');field.setValue(sel);}
Any thoughts/pointers on this will be really helpful.
Views
Replies
Sign in to like this content
Total Likes
As mentioned by Scott,
You would need to write custom xtype, which will actually reads/fetches the page properties value from JCR node and set in to the dialog field.
Reference article to support your use-case:- http://stackoverflow.com/questions/21325733/pass-data-from-one-component-to-another-in-adobe-cq
//Pass data from one component to another in adobe CQ
Only difference in your use-case is to fetch from page property.
I hope this will help you.
Thanks and Regards
Kautuk Sahni
Views
Replies
Sign in to like this content
Total Likes
You would need to write a custom xtype and in that xtype - which is just JS - retrieve the page props and then set the dialog fields. We have a article that shows you how to dynamically set fields in a dialog.
http://helpx.adobe.com/experience-manager/using/dynamically-updating-aem-custom-xtype.html
The only difference from your use case is you want to read values from the page props - not from another dialog field. However - this points you in the right direction.
Views
Replies
Sign in to like this content
Total Likes
As mentioned by Scott,
You would need to write custom xtype, which will actually reads/fetches the page properties value from JCR node and set in to the dialog field.
Reference article to support your use-case:- http://stackoverflow.com/questions/21325733/pass-data-from-one-component-to-another-in-adobe-cq
//Pass data from one component to another in adobe CQ
Only difference in your use-case is to fetch from page property.
I hope this will help you.
Thanks and Regards
Kautuk Sahni
Views
Replies
Sign in to like this content
Total Likes