0
votes

I've followed this: https://helpx.adobe.com/experience-manager/using/form_component_customaction.html tutorial and have setup a jsp sending data to an OSGI service.

In the tutorial, they pull the form params out one by one using request.getParameter().

How can I write this service to pull out all selections even if the form changes?

The reasoning for this is that we want to allow content authors to change the form without having to worry about changing backend code.

1

1 Answers

0
votes

I think you mean to get all the parameters of the request in general instead of having to extract named parameters one by one. For this requirement, the SlingHTTPServletRequest api provides various functions (either through its own functions or functions inherited from the ServletRequest class) such as getParameterMap() and getParameterNames(). You can check out the API at SlingHttpServletRequest