How to Access Spring MVC Model Attribute Name Containing a Point in Freemarker

I have the following code snippet in Spring MVC (3.0).

@RequestMapping(value="/add", method = RequestMethod.POST) public String handleAddResourceGroup(@Valid ResourceGroup resourceGroup, BindingResult bindingResult, Model model) { if (bindingResult.hasErrors()) { model.addAttribute("flash.validationErrors", bindingResult.getAllErrors()); return "add"; } //The rest of the code } 

How to access a model attribute named "flash.validationErrors" in Freemarker?

+4
source share
1 answer

Try ${.data_model["flash.validationErrors"]}

+2
source

Source: https://habr.com/ru/post/1344611/


All Articles