how to use 'USE API's' in listener? | Community
Skip to main content
amangoyal15
Level 3
November 17, 2016
Solved

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

  • November 17, 2016
  • 4 replies
  • 1666 views

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.

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 Peter_Puzanovs

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

4 replies

Peter_Puzanovs
Community Advisor
Community Advisor
November 17, 2016

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

amangoyal15
Level 3
November 17, 2016

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 

Peter_Puzanovs
Community Advisor
Peter_PuzanovsCommunity AdvisorAccepted solution
Community Advisor
November 17, 2016

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

amangoyal15
Level 3
November 22, 2016

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.