Пример #1
0
  public String save() {
    boolean isNew = (pharmacie.getId() == null || pharmacie.getId() == 0);
    pharmacieManager.save(pharmacie);

    String key = (isNew) ? "pharmacie.added" : "pharmacie.updated";
    addMessage(key);

    if (isNew) {
      return "list";
    } else {
      return "edit";
    }
  }
Пример #2
0
  public String delete() {
    pharmacieManager.remove(pharmacie.getId());
    addMessage("pharmacie.deleted");

    return "list";
  }