I have a object-String pair in the Map collection. I need to display object values as well as String on the table in the JSP along with radio button selection.
How do I do this, as per my knowledge the spring displaytag does not support Map.
Please help
Code:
below is the formBackingObject function, how do I display this in the jsp form?
public class ABCListingController extends SimpleFormController {
@Override
protected Object formBackingObject(HttpServletRequest request)
throws Exception {
DTO dmDto = new DTO();
Map<ABC, Integer> matrix = new HashMap<ABC, Integer>();
matrix = functionCall();
dmDto.setMatrix(matrix);
return dmDto;
}
}
jsp:
<c:forEach items="${matrix}" var="entry">
<tr>
<td><input type="radio" id="selected"
value="${entry.key.abcId}"></td>
<td><c:out value="${entry.key.abcVar}" />
<tr>
</c:forEach>
<div style="text-align: center">
<input type="submit" value="Submit" />
</div>
But how do I get the submitted data in onsubmit of the controller?