Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Send data from dialog to a servlet.

Avatar

Level 4

Hi guys,

I'm using AEM 6.2 and I'm looking for a way to send values from my component's dialog to a servlet.

is this a way to submit the data when the author confirms the dialog ?

Can you point me some resource into this ?

Thanks !

1 Accepted Solution

Avatar

Correct answer by
Level 10

If you want to pass data an author entered into a dialog to an AEM Java backend - why not use HTL and WCMUsePojo.

View solution in original post

7 Replies

Avatar

Level 10

Yes, but by default AEM will submit the resource to based on form action for that resource node.

But you can add your custom JS code based on event, like submit/success to send data to your servlet.

Adobe Experience Manager Help | Using Event Handlers in Adobe Experience Manager Touch UI Components

Avatar

Level 4

So let me ask to see if i understood correctly.

I can add a listener.js and configure it so when i press confirm on the component's dialog it will send an AJAX post request to my servlet with the values form the component ?

Thanks

Avatar

Correct answer by
Level 10

If you want to pass data an author entered into a dialog to an AEM Java backend - why not use HTL and WCMUsePojo.

Avatar

Level 10

Yes, but what is your use case?

Avatar

Level 4

Yeah, as an author I want to send the data from cq dialog to a servlet.

Avatar

Level 4

I will check it out. Thank you very much.