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

Data integration: rest parameters in adaptive form

alexanderl34874
Level 2
Level 2

Hello,

I'm about to build an adaptive forms application with the help of the new aem 6.3 feature "Data Integration". I use a swagger file which needs two parameters coming from the http header of the request. So i set up a servlet to read out the parameters and forward them to the form. Now my question:

What is the best way to get these parameters into my rule editor (where I want to make the ws call)?

1. Prefill hidden fields

- fill the 'data' attribute in my servlet like described in here: AEM 6.3 Forms Help | Prefill adaptive form fields

2. Get them with a sightly bean and set them in the form markup

- write a sightly use class to fetch the parameters from the request and set them into the markup

- access the variables from inside the rule editor

-> don´t know if jquery or such logic is possible i rule editor?

I feel a little uncomfortable with these solutions, because they look very complicated to me, so what is the best practice to get parameters into the webservice logic?

Any further suggestions?

Best regards

Alex

1 Reply
mayankg
Employee
Employee

You should go ahead with approach 1. Setting values in the markup would not work.