What I need in this case is to access a list of objects in the embedded form. Like the following:
camForm.on('form-loaded', function() {
camForm.variableManager.fetchVariable('templatesList');
});
camForm.on('variables-fetched', function() {
$scope.templatesList = camForm.variableManager.variable('templatesList').value;
});
But all camunda examples I found are accessing one object and its members. But I need to access a list of objects and loop over the objects.
Can you please give me a hint or guide me to an example how to do this client side in the form.
Thank you
Thank you very much
Out of the box, you can only work with Java Objects which are serialized in JSON format If Java Classes are serialized using JAX-B, you need to add custom XML parsing and writing logic to the embedded form. Java Objects serialized using Java Serialization cannot be used in forms.
Lets say I have created a list of objects on server side and put it with the Java Delegation into the scope execution.setVariable("documentTypeInfoWrapperList", documentTypeInfoWrapperList);
How can I access this list and the objects in the form?
What I tried in the form is:
<form role="form" name="branchForm">
<script cam-script type="text/form-script">
camForm.on('form-loaded', function() {
camForm.variableManager.fetchVariable('documentTypeInfoWrapperList');
});
camForm.on('variables-fetched', function() {
$scope.documentTypeInfoWrapperList = camForm.variableManager.variable('documentTypeInfoWrapperList').value;
});
</script>
<div class="form-group">
<div ng-repeat="documentTypeInfoWrapper in documentTypeInfoWrapperList track by $index">
{{documentTypeInfoWrapper.getName()}}
<hr>
{{documentTypeInfoWrapper.name}}
</div>
</div>
</form>
From what I read in the docu <you need to add custom XML parsing and writing logic to the embedded form.> But how?
execution.setVariable("documentTypeInfoWrapperList", documentTypeInfoWrapperList);
which I want to access from client side over
camForm.on('form-loaded', function() {
camForm.variableManager.fetchVariable('documentTypeInfoWrapperList');
});
Sorry for the misunderstanding. I know JSF and I know Velocity template but I am new to the camForm and angular JS Stuff.