0
votes

We have the need to create a custom AEM component that is able to trigger a save to the JCR programmatically (in the location of the page that is being edited). When building a custom AEM Component, you don't need to call the 'save' logic manually, you just add a <content> tag, and AEM will automatically add the content to the JCR when saving the dialog.

How can manually trigger the same save operation that would be executed when clicking the 'save' button on the custom AEM Component?

1

1 Answers

1
votes

The AEM page/template editor does async POST requests when you drag'n'drop components on a page, for example:

enter image description here

You can implement an async request as well for your save button and leverage the Sling POST Servlet or your own custom servlet to add to the JCR.