Example #1
0
 public String doUpdate() {
   try {
     RoleImpl roleImpl = new RoleImpl(roleId, roleDesc, roleName);
     pMgr.updateRole(roleImpl);
   } catch (ValidateFieldsException e) {
     e.printStackTrace();
   }
   writeToPage(response, getText("msg.operation.success"));
   return null;
 }
Example #2
0
 public String doAdd() {
   try {
     RoleImpl roleImpl = new RoleImpl(roleDesc, roleName);
     pMgr.createRole(roleImpl);
   } catch (ValidateFieldsException e) {
     log.error(e);
     return ajaxForwardError(e.getLocalizedMessage());
   }
   writeToPage(response, getText("msg.operation.success"));
   return null;
 }