public ActionForward execute(
      ActionMapping mapping,
      ActionForm form,
      HttpServletRequest request,
      HttpServletResponse response)
      throws Exception {

    Long feedbackId = Long.decode(BeanUtils.getProperty(form, "id"));
    String commentedited = BeanUtils.getProperty(form, "commentedited");
    String makepublic = BeanUtils.getProperty(form, "makepublic");
    boolean makepublicBool = "true".equals(makepublic);

    Feedback feedback = LegacySpringUtils.getFeedbackManager().get(feedbackId);

    feedback.setCommentedited(commentedited);
    feedback.setMakepublic(makepublicBool);

    LegacySpringUtils.getFeedbackManager().save(feedback);

    List feedbacks = LegacySpringUtils.getFeedbackManager().get(feedback.getUnitcode());

    request.setAttribute("feedbacks", feedbacks);

    return LogonUtils.logonChecks(mapping, request);
  }
 public ActionForward execute(
     ActionMapping mapping,
     ActionForm form,
     HttpServletRequest request,
     HttpServletResponse response)
     throws Exception {
   Calendar startdate = LoggingUtils.getDefaultStartDateForLogQuery();
   Calendar enddate = LoggingUtils.getDefaultEndDateForLogQuery();
   String nhsno = BeanUtils.getProperty(form, "nhsno");
   List log = getLogEntries(nhsno, startdate, enddate);
   request.setAttribute("log", log);
   UnitUtils.putRelevantUnitsInRequest(request);
   LoggingUtils.defaultDatesInForm(form, startdate, enddate);
   return LogonUtils.logonChecks(mapping, request);
 }
Пример #3
0
  public ActionForward execute(
      ActionMapping mapping,
      ActionForm form,
      HttpServletRequest request,
      HttpServletResponse response)
      throws Exception {

    String screenName = request.getParameter("screenname");
    if (screenName == null || screenName.trim().length() == 0) {
      return mapping.findForward("input");
    }
    User user = LegacySpringUtils.getUserManager().getLoggedInUser();

    if (user != null) {
      user.setScreenname(screenName);
      LegacySpringUtils.getUserManager().save(user);
    }

    setJforumScreenname(user);

    return LogonUtils.logonChecks(mapping, request);
  }