コード例 #1
0
  public ActionForward prepareTutorSelection(
      ActionMapping mapping,
      ActionForm actionForm,
      HttpServletRequest request,
      HttpServletResponse response) {
    AcademicInterval current = AcademicInterval.readDefaultAcademicInterval(AcademicPeriod.YEAR);
    AcademicInterval next =
        AcademicInterval.readDefaultAcademicInterval(AcademicPeriod.YEAR).getNextAcademicInterval();

    if (next == null) {
      request.setAttribute("academicInterval", current.getResumedRepresentationInStringFormat());
    } else {
      request.setAttribute("academicInterval", next.getResumedRepresentationInStringFormat());
    }
    return selectYear(mapping, actionForm, request, response);
  }
コード例 #2
0
  public static class YearSelection implements Serializable {
    private AcademicInterval executionYear =
        AcademicInterval.readDefaultAcademicInterval(AcademicPeriod.YEAR).getNextAcademicInterval();

    public YearSelection() {}

    public YearSelection(AcademicInterval executionYear) {
      this.executionYear = executionYear;
    }

    public AcademicInterval getExecutionYear() {
      return executionYear;
    }

    public void setExecutionYear(AcademicInterval executionYear) {
      this.executionYear = executionYear;
    }
  }