Source:
<code>protected ActionResult execute() throws EntityDoesNotExistException { String courseId = getRequestParamValue(Const.ParamsNames.COURSE_ID); String feedbackSessionName = getRequestParamValue(Const.ParamsNames.FEEDBACK_SESSION_NAME); Assumption.assertPostParamNotNull(Const.ParamsNames.COURSE_ID, courseId); Assumption.assertPostParamNotNull(Const.ParamsNames.FEEDBACK_SESSION_NAME, feedbackSessionName); new GateKeeper().verifyAccessible( logic.getInstructorForGoogleId(courseId, account.googleId), logic.getFeedbackSession(feedbackSessionName, courseId), false, Const.ParamsNames.INSTRUCTOR_PERMISSION_MODIFY_SESSION); InstructorFeedbackEditPageData data = new InstructorFeedbackEditPageData(account); FeedbackSessionAttributes feedbackSession = extractFeedbackSessionData(); feedbackSession.isOpeningEmailEnabled = true; try { logic.updateFeedbackSession(feedbackSession); statusToUser.add(Const.StatusMessages.FEEDBACK_SESSION_EDITED); statusToAdmin = "Updated Feedback Session " + "<span class=\"bold\">(" + feedbackSession.feedbackSessionName + ")</span> for Course " + "<span class=\"bold\">[" + feedbackSession.courseId + "]</span> created.<br>" + "<span class=\"bold\">From:</span> " + feedbackSession.startTime + "<span class=\"bold\"> to</span> " + feedbackSession.endTime + "<br><span class=\"bold\">Session visible from:</span> " + feedbackSession.sessionVisibleFromTime + "<br><span class=\"bold\">Results visible from:</span> " + feedbackSession.resultsVisibleFromTime + "<br><br><span class=\"bold\">Instructions:</span> " + feedbackSession.instructions; data.setHasError(false); } catch (InvalidParametersException e) { setStatusForException(e); data.setHasError(true); } <START> data.setStatusForAjax(statusToUser.get(0)); <END> return createAjaxResult(data); }</code><technical_language>displaying <code>statusToUser</code> good? able handle displaying multiple status messages. If user is multiple tabs teammates, statusMessage show in wrong tab. code in this action in future add multiple status messages</technical_language>

Target:
protected ActionResult execute() throws EntityDoesNotExistException { String courseId = getRequestParamValue(Const.ParamsNames.COURSE_ID); String feedbackSessionName = getRequestParamValue(Const.ParamsNames.FEEDBACK_SESSION_NAME); Assumption.assertPostParamNotNull(Const.ParamsNames.COURSE_ID, courseId); Assumption.assertPostParamNotNull(Const.ParamsNames.FEEDBACK_SESSION_NAME, feedbackSessionName); new GateKeeper().verifyAccessible( logic.getInstructorForGoogleId(courseId, account.googleId), logic.getFeedbackSession(feedbackSessionName, courseId), false, Const.ParamsNames.INSTRUCTOR_PERMISSION_MODIFY_SESSION); InstructorFeedbackEditPageData data = new InstructorFeedbackEditPageData(account); FeedbackSessionAttributes feedbackSession = extractFeedbackSessionData(); feedbackSession.isOpeningEmailEnabled = true; try { logic.updateFeedbackSession(feedbackSession); statusToUser.add(Const.StatusMessages.FEEDBACK_SESSION_EDITED); statusToAdmin = "Updated Feedback Session " + "<span class=\"bold\">(" + feedbackSession.feedbackSessionName + ")</span> for Course " + "<span class=\"bold\">[" + feedbackSession.courseId + "]</span> created.<br>" + "<span class=\"bold\">From:</span> " + feedbackSession.startTime + "<span class=\"bold\"> to</span> " + feedbackSession.endTime + "<br><span class=\"bold\">Session visible from:</span> " + feedbackSession.sessionVisibleFromTime + "<br><span class=\"bold\">Results visible from:</span> " + feedbackSession.resultsVisibleFromTime + "<br><br><span class=\"bold\">Instructions:</span> " + feedbackSession.instructions; data.setStatusForAjax(Const.StatusMessages.FEEDBACK_SESSION_EDITED); data.setHasError(false); } catch (InvalidParametersException e) { setStatusForException(e); data.setStatusForAjax(e.getMessage()); data.setHasError(true); } return createAjaxResult(data); }