Пример #1
0
  public void updateNote() {

    try {
      if (clientNoteHome != null
          && !Strings.isNullOrEmpty(clientNoteHome.getInstance().getNotes())) {

        clientNoteHome.getInstance().setUsername(currentUser.getUser().getUserName());
        clientNoteHome.getInstance().setEntrydate(new Date());

        String action = clientNoteHome.update();

        if (action != null && action.equalsIgnoreCase("updated")) {

          clientNoteHome.clearInstance();
          clientNoteHome.wire();
        }

        facesMessages.clearGlobalMessages();
        facesMessages.clear();
      }
    } catch (Exception e) {
      String s = "";
    }

    String s = "";
  }
Пример #2
0
  public String loadNote(ClientNotes note) {
    String returnString = "";

    try {

      if (note != null && note.getClientnotesId() != 0) {
        clientNoteHome.clearInstance();
        clientNoteHome.setClientNotesId(note.getClientnotesId());
        clientNoteHome.wire();

        returnString = "note-loaded";
      }

    } catch (Exception e) {

    }

    return returnString;
  }
Пример #3
0
 public void preparedNewNote() {
   init();
   this.displayNoteForm = true;
   clientNoteHome.clearInstance();
   clientNoteHome.wire();
 }
Пример #4
0
 public void cancelNewNote() {
   init();
   clientNoteHome.clearInstance();
 }