Executing Scripts to populate selects

Hi,

is it possible to execute a script (js or jquery) to populate embedded forms through a json-response coming from another REST-Interface? I don’t like the external forms solution with JSF.

Thanks in advance

Hi,

do you want to load the complete markup of the embedded form from an external resource or do you only want to load some data that is displayed in the form (e.g. select options)?

Cheers
Sebastian

Hi Sebastian,

thanks for the fast response. My idea was to populate select options by a json-response coming from an external REST-Interface (Using Ajax).

@Bayqush take a look at:

Loading previous data in process start form

This was a similar goal to your use case. You should be able to use the code snippets and make a few modifications to do a ajax call.

Is there any solution without using AngularJS?

When you got the data from the AJAX response, you can also use plain Javascript to write the values into the respective form elements. You might need to manage the variables yourself though, as described in the documentation.

Ok thanks that might be a solution. My major problem is that I created a grails app which initiates a process. I don’t even know if that’s the optimal solution but I access the REST-API of camunda. I dunno how to pass a collection of Strings as process variable since the restricted data types that can be used are given.