I integrated HDIV and Spring MVC. Now I need to submit a form to the server. The problem is I need to give the submit button a name like "btnSave" or "btnSubmit". So that I can make request mapping like this
@RequestMapping(value = "/user", params = "btnSave", method = RequestMethod.POST)
and I render the submit button like this:
<input name="btnSave" type="submit" value="Save" />
Now HDIV will gives the error message: INVALID_PARAMETER_NAME
about btnSave.
I know I can exclude paramter btnSave in the HDIV configuration, but I am just wondering if there is any better solution. I have a lot of forms with different submit buttons on them and I dont want to put all of them into the HDIV configuration of paramsWithoutValidation.
Thanks.
You have to use Spring MVC's tag for submit.
I hope it helps.