Example #1
0
  @Transactional
  public void deleteFunction(Function function) {

    try {

      if (roleSysHome != null && function != null) {

        roleSysHome.getInstance().getFunctions().remove(function);

        String entityAction = roleSysHome.update();

        if (entityAction.equalsIgnoreCase("updated")) {

          facesMessages.clear();
          facesMessages.clearGlobalMessages();
        }

        roleSysHome.refresh();
      }

    } catch (Exception e) {
      System.out.println(e.getMessage());
    }
  }
Example #2
0
 public String cancelAddFunction() {
   init();
   roleSysHome.refresh();
   return "cancel";
 }