コード例 #1
0
  @CommitAfter
  Object onSuccessFromEditDualPassageForm() {

    longDualpassage.setPassageone(fBodyone);
    longDualpassage.setPassagetwo(fBodytwo);
    longDualpassage.setTitle(fTitle);
    longDualpassage.setSource(fSource);
    longDualpassage.setSummary(fSummary);
    longDualpassage.setRevComment(fComment);

    for (Tag t : addedTags) {
      if (!(longDualpassage.getTaglist().contains(t))) {
        longDualpassage.getTaglist().add(t);
      }
    }
    passageService.checkLongDualPassage(longDualpassage);
    Timestamp now = new java.sql.Timestamp(System.currentTimeMillis());

    longDualpassage.setUpdatedAt(now);

    longDualpassage.setUpdatedBy(user);
    longDualpassage.setComplete(true);

    longDualpassageDAO.doSave(longDualpassage);
    showdualpasage.setLongDualPassage(longDualpassage);
    return showdualpasage;
  }
コード例 #2
0
  @SetupRender
  void onSetup() {
    if (passParam != null) {
      this.longDualpassage = longDualpassageDAO.findById(passParam.getId());
      if (longDualpassage != null) {

        fBodyone = longDualpassage.getPassageone();
        fBodytwo = longDualpassage.getPassagetwo();
        fSource = longDualpassage.getSource();
        fSummary = longDualpassage.getSummary();
        fTitle = longDualpassage.getTitle();
        addedTags = longDualpassage.getTaglist();
      }
    }
  }