Hi I try pass an array in a bean from jsp to java.
@ModelAttribute("areasActividadAdminBean")AreasActividadAdminBean areasActividadAdminBean
Agrupacion[] listaAgrupaciones = x;
model.addAttribute("areasActividadAdminBean",areasActividadAdminBean);
In JSP i have this:
<form:form commandName="areasActividadAdminBean" .....>
<form:hidden path="listaAgrupaciones"/>
<input type="submit" value="Button"/>
But I get this error:
org.springframework.validation.BindException: org.springframework.validation.BeanPropertyBindingResult: 1 errors
Field error in object 'areasActividadAdminBean' on field 'listaAgrupaciones': rejected value
Make sure the BindingResult method parameter follows the Object that you are binding to. Example
public String add(@Valid DomainObject domainObj, BindingResult result, ModelMap model) {
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With