Esempio n. 1
0
 @RequestMapping("/sensitivity/v_list.do")
 public String list(HttpServletRequest request, ModelMap model) {
   Integer siteId = CmsUtils.getSiteId(request);
   List<CmsSensitivity> list = manager.getList(siteId, false);
   model.addAttribute("list", list);
   return "sensitivity/list";
 }
Esempio n. 2
0
 @RequestMapping("/sensitivity/o_save.do")
 public String save(CmsSensitivity bean, HttpServletRequest request, ModelMap model) {
   WebErrors errors = validateSave(bean, request);
   if (errors.hasErrors()) {
     return errors.showErrorPage(model);
   }
   Integer siteId = CmsUtils.getSiteId(request);
   bean = manager.save(bean, siteId);
   model.addAttribute("message", "global.success");
   log.info("save CmsSensitivity id={}", bean.getId());
   return list(request, model);
 }
 @RequestMapping("/group/v_edit.do")
 public String edit(
     Integer groupId,
     short groupType,
     Integer pageNo,
     HttpServletRequest request,
     ModelMap model) {
   BbsUserGroup group = manager.findById(groupId);
   CmsSite site = CmsUtils.getSite(request);
   List<BbsPostType> postTypes = bbsPostTypeMng.getList(CmsUtils.getSiteId(request), null, null);
   List<BbsPostType> tempList;
   Map<String, List<BbsPostType>> childPostTypes = new HashMap<String, List<BbsPostType>>();
   for (BbsPostType parent : postTypes) {
     tempList = bbsPostTypeMng.getList(site.getId(), null, parent.getId());
     childPostTypes.put(parent.getId().toString(), tempList);
   }
   model.put("childPostTypes", childPostTypes);
   model.put("postTypes", postTypes);
   model.put("bbsUserGroup", group);
   model.put("groupType", groupType);
   return "group/edit";
 }