コード例 #1
0
  /**
   * Grava novo registro ou atualiza um registro.
   *
   * @throws UniqueConstraintException the unique constraint exception
   */
  public void save() throws UniqueConstraintException {
    service.save(getUser());

    JsfUtil.addSuccessMessage(WebUtils.SAVE_OK);

    clearScreen();
  }
コード例 #2
0
  /** Exclui um registro da tabela parameters. */
  public void remove() {
    service.remove(getUser());

    JsfUtil.addSuccessMessage(WebUtils.DELETE_OK);

    clearScreen();
  }
コード例 #3
0
  /**
   * Update.
   *
   * @throws UniqueConstraintException the unique constraint exception
   */
  public void update() throws UniqueConstraintException {
    System.out.println("update->" + getUser());
    service.update(getUser());

    JsfUtil.addSuccessMessage(WebUtils.EDIT_OK);

    clearScreen();
  }
コード例 #4
0
 /** Limpa os campos input e atualiza a lista de usuários cadastrados. */
 private void clearScreen() {
   listUsers = service.all();
   listUserProfiles = service.findUserByUsername(getUserSession());
   user = new User();
 }