Hi,
I am facing a task here wherein I need to add an enhancement into an existing Spring MVC app written in 2.5.
My workflow is like this:
- Retrieve list of Activity from DB then display it
- Manager should approve first then the QA(Quality Assurance)
Now, I have this HTML markup for the first item.
//This is for the first item only
//For Cost Generation Item
<h4>Manager Approval:</h4>
<p>
Attach File:<input type="file" size="30" />
</p>
<p>
Remarks:<textarea rows="5" cols="23"></textarea>
</p>
<p>
<input type="submit" value="Approve"/>
</p>
<h4>QA Approval:</h4>
<p>
QA Remarks:
<textarea rows="5" cols="23"></textarea>
</p>
<p>
<input type="submit" value="Validate"/>
<input type="submit" value="Reject"/>
</p>
I am facing this problem and I want to ask the following questions:
How Many forms?
- Should I wrap all items into one form and generate one mapping?
- Create each form for each item. (This will create multiple forms in one JSP and generate multiple mappings)
How to handle multiple submit buttons?
- How to check if the submit button click is Approve/Validate/Reject?
I am new to Spring and in Web development in general. Hope somebody can guide me on the correct approach.