예제 #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";
  }