Exemple #1
0
  @Transactional
  public void deleteRole(RoleSys role) {

    try {

      if (role != null && role.getRoleId() != 0) {
        roleSysNewHome.clearInstance();
        roleSysNewHome.setRoleNewHomeId(role.getRoleId());
        roleSysNewHome.wire();

        String entityAction = roleSysNewHome.remove();

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

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

        roleSysNewHome.clearInstance();

        // staffHome.refresh();

      }

    } catch (Exception e) {
      System.out.println(e.getMessage());
    }
  }
Exemple #2
0
  // Ajax
  public void prepareEditRole(RoleSys role) {

    if (role != null) {
      roleSysNewHome.setInstance(role);
      roleSysNewHome.wire();

      addNew = true;
    }
  }