<form:form method="POST" action="index.htm" modelAttribute="itemGroup" inputpath="value">
<input type="image" img src="Images/receipt.png" height="150px" width="180px" alt="Submit" />
<input type="image" img src="Images/shoppinglist.png" height="150px" width="180px" alt="Submit" ">
<input type="image" img src="Images/voucher.png" height="150px" width="180px" alt="Submit" >
<input type="image" img src="Images/card.png" height="150px" width="180px" alt="Submit" />
</form:form>
@RequestMapping(value = {"/index"},method = RequestMethod.GET)
public String showHomePage(Model model)
{
model.addAttribute("itemGroup", new ItemGroup());
return "index";
}
@RequestMapping(value = {"/index"},method = RequestMethod.POST)
public String onSubmit(@ModelAttribute("itemGroup") ItemGroup itemGroup, Model model)
{
model.addAttribute("itemGroupImage",itemGroupService.showJobGroupImage(itemGroup.getValue()));
return "itemGroupView";
}
<input type="image" img src="Images/receipt.png" value="receipt" height="150px" width="180px" alt="Submit" />
<input type="image" img src="Images/shoppinglist.png" value="shoppinglist" height="150px" width="180px" alt="Submit" ">