コード例 #1
0
 /**
  * 初始化权限下拉菜单
  *
  * @throws Exception
  */
 private void initPrivilege() throws Exception {
   Privilege p = new Privilege();
   p.setSetId(pslist.get(0).getId());
   plist = privilegeBiz.findListByCondition(p);
   p.setId(-1);
   p.setName(getText("select_default"));
   plist.add(0, p);
 }
コード例 #2
0
 @Action(
     value = "update_privilege",
     results = {
       @Result(
           name = "success",
           type = "json",
           params = {
             "contentType", "text/json",
             "includeProperties", "results"
           })
     })
 public String execute() {
   try {
     Privilege old = privilegeBiz.findPrivilegeById(privilege.getId());
     privilege.setFullPath(old.getFullPath());
     privilege.setIsShow(old.getIsShow());
     privilegeBiz.modify(privilege);
     results = true;
   } catch (Exception e) {
     e.printStackTrace();
   }
   return SUCCESS;
 }