Ejemplo n.º 1
0
 @Override
 protected void prepareModel() throws Exception {
   if (id != null) {
     entity = accountManager.getRole(id);
   } else {
     entity = new Role();
   }
 }
Ejemplo n.º 2
0
 @Override
 public String save() throws Exception {
   // 根据页面上的checkbox 整合Role的Authorities Set.
   HibernateUtils.mergeByCheckedIds(entity.getAuthorityList(), checkedAuthIds, Authority.class);
   // 保存用户并放入成功信息.
   accountManager.saveRole(entity);
   addActionMessage("保存角色成功");
   return RELOAD;
 }
Ejemplo n.º 3
0
 /** input页面显示所有授权列表. */
 public List<Authority> getAllAuthorityList() {
   return accountManager.getAllAuthority();
 }
Ejemplo n.º 4
0
 @Override
 public String delete() throws Exception {
   accountManager.deleteRole(id);
   addActionMessage("删除角色成功");
   return RELOAD;
 }
Ejemplo n.º 5
0
 // -- CRUD Action 函数 --//
 @Override
 public String list() throws Exception {
   allRoleList = accountManager.getAllRole();
   return SUCCESS;
 }