I have a rest endpoint that I want to invoke. I dont want to use fdm, how to invoke AEM servlet from form? can we set checkbox dynamically with servlet response?
Solved! Go to Solution.
Views
Replies
Total Likes
1. Create a client libs folder
2. In the JS file create a function
function getPdf() {
var settings = {
"async": true,
"url": "URL will go here",
"method": "POST",
data: {
'data': result.data
}
}
$.ajax(settings).done(function(response) {
guideBridge.resolveNode("pdf").value = response;
})
}
3. Go to form, map your client libs.
4. Go to rule editor/code editor and map the function which is making ajax call as shown below:
you can use javascript to make the call. Create a client library and in that client library have your javascript make the call to the servlet. You can capture the response and display the value in the form using the guide bridge
thanks @workflowuser
1. Create a client libs folder
2. In the JS file create a function
function getPdf() {
var settings = {
"async": true,
"url": "URL will go here",
"method": "POST",
data: {
'data': result.data
}
}
$.ajax(settings).done(function(response) {
guideBridge.resolveNode("pdf").value = response;
})
}
3. Go to form, map your client libs.
4. Go to rule editor/code editor and map the function which is making ajax call as shown below:
@Mayank_Gandhi this worked. thanks!
Views
Likes
Replies