Hi Bill,
Thanks for the response and help to solve my issue in spring.
Actually i had already placed the below line in the form tag ...
enctype="multipart/form-data
As suggested i had also updated the form tag to normal input tag as below ...
<c:forEach var="document" items="${partyRegnStepFour.documentList}" varStatus="loopStatus">
<tr>
<td>
<input name="documentList[${loopStatus.index}].documentId}" value="${document.documentId}"/>
</td>
<td>
<input name="documentList[${loopStatus.index}].documentName}" value="${document.documentName}" />
</td>
<td>
<input name="documentList[${loopStatus.index}].mandatory}" value="${document.mandatory}" />
</td>
<td>
<input name="documentList[${loopStatus.index}].documentSelected}" value="${document.documentSelected}" type="file"/>
</td>
</tr>
</c:forEach>
The values are getting displayed...but the values are not going to the action method in the controller.
In the below action method the List<DocumentUpload> is coming as NULL.
The action method in the controller is as follows :
@ActionMapping(params = "actionParamRegisterNewParty=registerNewParty_Step4")
public void actionRegisterNewParty_Step4(@ModelAttribute("partyRegnStepFour") PartyRegnStepFour partyRegnStepFour, final BindingResult errors, final ExtendedModelMap model,
final ActionRequest actionRequest, final ActionResponse actionResponse) {
List<DocumentUpload> listFileUpload = partyRegnStepFour.getDocumentList();
if (listFileUpload != null && listFileUpload.size() > 0) {
System.out.println("frm listFileUpload---------------------------------");
for (DocumentUpload
doc : listFileUpload) {
System.out.println(doc.getDocumentId());
System.out.println(doc.getDocumentName());
System.out.println(doc.getMandatory());
System.out.println(doc.getDocumentSelected().getOriginalFilename());
}
} else {
System.out.println("frm else --------------------------------------------------------------------------------------------------");
}
actionResponse.setRenderParameter("renderParamRegisterNewParty", renderResponseString);
}
Advance thanks for your help.