Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

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

amangoyal15
Level 3
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
Peter_Puzanovs
Correct answer by
Community Advisor
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

0 Replies
Peter_Puzanovs
Community Advisor
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

amangoyal15
Level 3
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 

Peter_Puzanovs
Correct answer by
Community Advisor
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

amangoyal15
Level 3
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.