我正在尝试将带有表单标签的HasMap发送到我的Controller,但它给了我下一个错误:
org.springframework.beans.NullValueInNestedPathException: Invalid property 'botonesPeriodo[Z00][B1]' of bean class [com.stockcrowd.v2.form.DonacionPermanenteForm]: Cannot access indexed value of property referenced in indexed property path 'botonesPeriodo[Z00][B1]': returned null
Java上的Map的结构是这样的:
HashMap<String, TreeMap<String, Object>>
表单如下:
<div class="form-input row">
<div class="col-lg-4 col-md-5 col-sm-4 col-xs-6">
<form:input path="botonesPeriodo[${periodo.key}][${boton.key}].importe"/>
</div>
</div>
这是我的控制器,地图是DonacionPermanenteForm类的attr:
@RequestMapping(value="dashboard/permanente", method=RequestMethod.POST)
public @ResponseBody int guardarConfiguracion(DonacionPermanenteForm form, MultipartFile file){