From: lgzzsf <lg...@us...> - 2005-09-23 17:17:44
|
Update of /cvsroot/gatormail/GatorMail/src/java/edu/ufl/osg/webmail/actions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3074/src/java/edu/ufl/osg/webmail/actions Modified Files: ModifyComposeAction.java Log Message: RFE 1194586 Cancel composition of message button and clean up attached files if they exist. Index: ModifyComposeAction.java =================================================================== RCS file: /cvsroot/gatormail/GatorMail/src/java/edu/ufl/osg/webmail/actions/ModifyComposeAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ModifyComposeAction.java 22 Feb 2004 07:59:55 -0000 1.2 --- ModifyComposeAction.java 23 Sep 2005 17:17:36 -0000 1.3 *************** *** 59,62 **** --- 59,63 ---- map.put("button.attachment.upload", "uploadAttachment"); map.put("button.attachment.delete", "deleteAttachment"); + map.put("button.cancelMessage", "cancelMessage"); } *************** *** 101,104 **** --- 102,122 ---- } + public ActionForward cancelMessage(final ActionMapping mapping, final ActionForm form, final HttpServletRequest request, final HttpServletResponse response) throws Exception { + logger.debug("=== ModifyComposeAction.cancelMessage() begin ==="); + ActionsUtil.checkSession(request); + + final ActionErrors errors = new ActionErrors(); + final HttpSession session = request.getSession(); + final ComposeForm compForm = (ComposeForm)form; + + // get attachments List from session + final AttachList attachList = Util.getAttachList(compForm.getComposeKey(), session); + + attachList.clear(); + + logger.debug("=== ModifyComposeAction.cancelMessage() end ==="); + return mapping.findForward("inbox"); + } + /** * Deletes selected attachments. |