public void deleteFlaggedComment(ActionEvent event) { if (deleteCommentLink.getAttributes().get("commentId") != null) { flaggedCommentId = new Long(deleteCommentLink.getAttributes().get("commentId").toString()); } String deletedMessage = "You reported as abusive a comment in the study titled, " + getFlaggedStudyTitle() + ". " + "\n" + "The comment was, \"" + getFlaggedStudyComment() + "\". " + "\n" + "This comment was deleted in accordance with the " + "study comments terms of use."; studyCommentService.deleteComment(flaggedCommentId, deletedMessage); getVDCRequestBean().setSuccessMessage("Successfully deleted the flagged comment."); // cleanup flaggedCommentId = new Long("0"); commentsForReview = null; actionComplete = true; }