I have one pathfield and smartimage field.
i want to select image path from DAM through pathfield.
depending on the path of that image , i want to set that image in smartimage field.
Please assist me.
Solved! Go to Solution.
It's been a 7-8 months since I worked with classic UI.
Here's is what I would suggest:
1. To Pathfield there would be listeners available, where on select of some path it will trigger. It can be dialogselect or change
2. On these events you can write function. Event will give you the value selected in path field
3. Now search for the smartImage using findByType and use setValue on it.
I dont have the exact code, but it should be fairly easy as classic UI is full of events/methods to manage these stuff.
https://docs.adobe.com/docs/en/cq/5-6-1/widgets-api/index.html
To perform this - you need to use code and create a custom XTYPE.
You need to write application logic using this API:
https://docs.adobe.com/docs/en/cq/5-6/widgets-api/index.html
To learn how to write a custom xtype -- see this community article:
https://helpx.adobe.com/experience-manager/using/creating-custom-xtype.html
You would need to write code using the SmartImage class
https://docs.adobe.com/content/docs/en/cq/5-6-1/widgets-api/index.html?class=CQ.form.html5smartimage
Hope this helps....
smacdonald2008 wrote...
To perform this - you need to use code and create a custom XTYPE.
You need to write application logic using this API:
https://docs.adobe.com/docs/en/cq/5-6/widgets-api/index.html
To learn how to write a custom xtype -- see this community article:
https://helpx.adobe.com/experience-manager/using/creating-custom-xtype.html
You would need to write code using the SmartImage class
https://docs.adobe.com/content/docs/en/cq/5-6-1/widgets-api/index.html?class=CQ.form.html5smartimage
Hope this helps....
Hi smacdonald, i saw an reference of doing this with "handleDrop" function of CQ.form.html5smartimage. But i am not getting it properly.
Please have a look on the snippet of the code -
Full Reference Link-
Please assist me , would it be possible to achieve my result by this approach?
Views
Replies
Total Likes
To programmatically work with CQ.html5.form.SmartImage- look at this artilce:
http://experience-aem.blogspot.ca/2013/12/aem-cq-56-adding-images-in-multifield.html
I will look for other examples of using this class.
However - why go through this coding when you DRAG and DROP DAM images via the content finder and you do not have to code.
What advantage will selecting an image via a Path Finder have over whats available out of the box?
Views
Replies
Total Likes
I have have asked internal expert to have a look at this.
I will get back to you soon.
~kautuk
Views
Replies
Total Likes
It's been a 7-8 months since I worked with classic UI.
Here's is what I would suggest:
1. To Pathfield there would be listeners available, where on select of some path it will trigger. It can be dialogselect or change
2. On these events you can write function. Event will give you the value selected in path field
3. Now search for the smartImage using findByType and use setValue on it.
I dont have the exact code, but it should be fairly easy as classic UI is full of events/methods to manage these stuff.
https://docs.adobe.com/docs/en/cq/5-6-1/widgets-api/index.html
Views
Likes
Replies