// AJAX请求,不返回页面
@RequestMapping("/template/o_ajaxUpdate.do")
public void ajaxUpdate(String root, String name, String source,
HttpServletRequest request, HttpServletResponse response,
ModelMap model) {
WebErrors errors = validateUpdate(root, name, source, request);
if (errors.hasErrors()) {
ResponseUtils.renderJson(response, "{success:false,msg:'"
+ errors.getErrors().get(0) + "'}");
}
tplManager.update(name, source);
log.info("update Template name={}.", name);
cmsLogMng.operating(request, "template.log.update", "filename=" + name);
model.addAttribute("root", root);