Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

Call Back Function in EXTJs after author Chooses Yes/NO from CQ Message Box

Avatar

Level 4

Hi Guys,

From a Java Servlet i am returning a String value to EXTJs and based on that I am displaying a CQ Message box , where author can choose Yes(OK) or NO(Cancel) , based on this value i need to return the control to my Servlet (I need to take care of other Business logic based on this value from author), how can i achieve this? Do i need to call/create another Servlet and write the logic there ? Can I Call the same Servlet in any way ? Looking forward for a reply..thanks in Advance.

1 Accepted Solution

Avatar

Correct answer by
Level 10

Initially when you are getting value you can make a ajax call to get the required data with same servlet.(GET request)

Once the value is selected by user you can send the response via ajax call to that sameservlet ( POST request, in this case doPost() will be used)

Take a look at servlet use case:https://helpx.adobe.com/experience-manager/using/custom-sling-servlets.html

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

Initially when you are getting value you can make a ajax call to get the required data with same servlet.(GET request)

Once the value is selected by user you can send the response via ajax call to that sameservlet ( POST request, in this case doPost() will be used)

Take a look at servlet use case:https://helpx.adobe.com/experience-manager/using/custom-sling-servlets.html