Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

how to use 'USE API's' in listener?

Avatar

Level 3

In dialog, I have a pathfield for which i am using listener and one smartimage field. What i want is that from pathfield i have to select a page ( on that page , there would be some hero image), so once i select the path of page, i need to fetch the hero image of that page and set the value of smartpage field  with that image.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Good, that is totally possible, but would require you to write custom code. Combine your dialog with the listener and servlet on the back end that will in turn return you the results to your dialog.

Combine [1] and [2]

[1] http://www.codermag.net/2016/03/how-to-write-listener-in-aemcq.html

[2] https://helpx.adobe.com/experience-manager/using/HttpClient_AEM.html

View solution in original post

4 Replies

Avatar

Community Advisor

Hey Amangoal,

Sounds fair, can't understand why you want to use 'WCMUse API' for this through.

Simple GET request to a Sling Servlet would work as well. Have a look at this article, describes it pretty well [1]

[1] https://helpx.adobe.com/experience-manager/using/HttpClient_AEM.html

Regards,

Peter

Avatar

Level 3

PuzanovsP wrote...

Hey Amangoal,

Sounds fair, can't understand why you want to use 'WCMUse API' for this through.

Simple GET request to a Sling Servlet would work as well. Have a look at this article, describes it pretty well [1]

[1] https://helpx.adobe.com/experience-manager/using/HttpClient_AEM.html

Regards,

Peter

 

Hi peter , 

in my dilaog , i have two widgets ( pathfield and html5smartimage) .... now from pathfield, i select a page like artcile page which consist of a image. now i want , once i select the page from pathfield , image of that page automatically set to html5smartimage value 

Avatar

Correct answer by
Community Advisor

Good, that is totally possible, but would require you to write custom code. Combine your dialog with the listener and servlet on the back end that will in turn return you the results to your dialog.

Combine [1] and [2]

[1] http://www.codermag.net/2016/03/how-to-write-listener-in-aemcq.html

[2] https://helpx.adobe.com/experience-manager/using/HttpClient_AEM.html

Avatar

Level 3

PuzanovsP wrote...

Good, that is totally possible, but would require you to write custom code. Combine your dialog with the listener and servlet on the back end that will in turn return you the results to your dialog.

Combine [1] and [2]

[1] http://www.codermag.net/2016/03/how-to-write-listener-in-aemcq.html

[2] https://helpx.adobe.com/experience-manager/using/HttpClient_AEM.html

 

Hi PuzanovsP,

            can you please send me some reference example for this? It  wud be really good.