Exemple #1
0
  /**
   * primarily to sort attendance for every action.
   *
   * @see
   *     org.kuali.rice.kns.web.struts.action.KualiAction#execute(org.apache.struts.action.ActionMapping,
   *     org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest,
   *     javax.servlet.http.HttpServletResponse)
   */
  @Override
  public ActionForward execute(
      ActionMapping mapping,
      ActionForm form,
      HttpServletRequest request,
      HttpServletResponse response)
      throws Exception {
    ActionForward forward = super.execute(mapping, form, request, response);
    ((MeetingFormBase) form).getMeetingHelper().sortAttendances();
    // if view protocol is using popup, then need following code
    String command = request.getParameter("command");
    if (StringUtils.isNotBlank(command) && "viewProtocolSubmission".equals(command)) {
      forward = viewProtocolSubmission(mapping, form, request, response);
    }

    ((MeetingFormBase) form)
        .getMeetingHelper()
        .setHideReviewerName(
            getReviewerCommentsService()
                .setHideReviewerName(
                    ((MeetingFormBase) form)
                        .getMeetingHelper()
                        .getCommitteeSchedule()
                        .getCommitteeScheduleMinutes()));

    // use the entry type comparator to sort the minutes
    Collections.sort(
        ((MeetingFormBase) form)
            .getMeetingHelper()
            .getCommitteeSchedule()
            .getCommitteeScheduleMinutes(),
        CommitteeScheduleMinuteBase.entryTypeComparator);

    return forward;
  }
Exemple #2
0
 /**
  * override method to handle person/rolodex lookup return.
  *
  * @see
  *     org.kuali.rice.kns.web.struts.action.KualiAction#refresh(org.apache.struts.action.ActionMapping,
  *     org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest,
  *     javax.servlet.http.HttpServletResponse)
  */
 @Override
 public ActionForward refresh(
     ActionMapping mapping,
     ActionForm form,
     HttpServletRequest request,
     HttpServletResponse response)
     throws Exception {
   if (StringUtils.isNotBlank(request.getParameter(REFRESH_CALLER))) {
     if ("nonOrganizationalRolodexLookupable".equals(request.getParameter(REFRESH_CALLER))) {
       ((MeetingFormBase) form)
           .getMeetingHelper()
           .getNewOtherPresentBean()
           .getAttendance()
           .setNonEmployeeFlag(true);
     } else {
       ((MeetingFormBase) form)
           .getMeetingHelper()
           .getNewOtherPresentBean()
           .getAttendance()
           .setNonEmployeeFlag(false);
     }
   }
   return super.refresh(mapping, form, request, response);
 }
Exemple #3
0
  /**
   * This method is to save committee schedule when the 'save' button on meeting detail page is
   * clicked.
   */
  public ActionForward save(
      ActionMapping mapping,
      ActionForm form,
      HttpServletRequest request,
      HttpServletResponse response)
      throws Exception {

    MeetingFormBase meetingFormBase = (MeetingFormBase) form;
    CommitteeScheduleBase committeeSchedule =
        meetingFormBase.getMeetingHelper().getCommitteeSchedule();
    if (isValidToSave(meetingFormBase.getMeetingHelper(), meetingFormBase.isReadOnly())) {
      meetingFormBase.getMeetingHelper().populateAttendancePreSave();
      getMeetingService()
          .saveMeetingDetails(
              committeeSchedule, meetingFormBase.getMeetingHelper().getDeletedBos());
      meetingFormBase.getMeetingHelper().initDeletedList();
    }
    return mapping.findForward(Constants.MAPPING_BASIC);
  }
Exemple #4
0
  /** This method is for 'close' button. Confirmation of 'save' is performed. */
  public ActionForward close(
      ActionMapping mapping,
      ActionForm form,
      HttpServletRequest request,
      HttpServletResponse response)
      throws Exception {

    MeetingFormBase meetingFormBase = (MeetingFormBase) form;
    MeetingFormBase meetingForm = meetingFormBase;
    Object question = request.getParameter(KRADConstants.QUESTION_INST_ATTRIBUTE_NAME);
    if (question == null && meetingForm.getMeetingHelper().canModifySchedule()) {
      return performQuestionWithoutInput(
          mapping,
          form,
          request,
          response,
          CLOSE_QUESTION_ID,
          CLOSE_QUESTION,
          KRADConstants.CONFIRMATION_QUESTION,
          meetingFormBase.getMethodToCall(),
          "");
    } else if (meetingForm.getMeetingHelper().canModifySchedule()) {
      Object buttonClicked = request.getParameter(KRADConstants.QUESTION_CLICKED_BUTTON);
      if ((CLOSE_QUESTION_ID.equals(question)) && ConfirmationQuestion.YES.equals(buttonClicked)) {
        CommitteeScheduleBase committeeSchedule =
            meetingForm.getMeetingHelper().getCommitteeSchedule();
        if (isValidToSave(meetingFormBase.getMeetingHelper(), meetingFormBase.isReadOnly())) {
          meetingFormBase.getMeetingHelper().populateAttendancePreSave();
          getMeetingService()
              .saveMeetingDetails(
                  committeeSchedule, meetingFormBase.getMeetingHelper().getDeletedBos());
          meetingFormBase.getMeetingHelper().initDeletedList();
        } else {
          return mapping.findForward(Constants.MAPPING_BASIC);
        }
      }
    }

    return mapping.findForward(KRADConstants.MAPPING_PORTAL);
  }