开发者

How to access a Spring MVC model attribute name that contain a dot in Freemarker

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

@RequestMapping(value开发者_C百科="/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 can access the model attribute with the name "flash.validationErrors" in Freemarker?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜