Hi All,
We have a use case where we need to add 'Print' and 'Submit' buttons to an HTML5 form. We are calling a servlet and adding that servlet from the XDP file properties. This servlet will call two different methods based on the click event. For example, if a user clicks on 'Print,' it will call the same servlet with Print method and a separate method for submission.
First of all, could you please let me know if we can add two HTTP Submit Buttons to a single XDP form? If yes, then how can we call the same servlet? Can we call it through an AJAX call?
Alternatively, you can also guide me on how to achieve this use case with better approach.
Best regards
Nilesh
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
One approach will be to expose the Post method servlet as RESTful API, using a swagger file to create data source configuration and create a form data model based on it and integrate it with your form.
Take a submit button and Configure the Adaptive Form container submit action as Submit using the Form Data Model.
Based on passing the data to the post method, you can write your logic for the print/submit button in the servlet.
One approach will be to expose the Post method servlet as RESTful API, using a swagger file to create data source configuration and create a form data model based on it and integrate it with your form.
Take a submit button and Configure the Adaptive Form container submit action as Submit using the Form Data Model.
Based on passing the data to the post method, you can write your logic for the print/submit button in the servlet.
@nileshpb Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
Views
Replies
Total Likes