@RequestMapping(value = "/deleteReminder.ajax", method = RequestMethod.POST) protected void deleteReminder(HttpServletRequest request, HttpServletResponse response) throws Exception { String message = ""; AuthRequest ar = null; try { ar = getLoggedInAuthRequest(request, response, "message.must.be.login"); String containerId = ar.reqParam("containerId"); NGContainer ngc = NGPageIndex.getContainerByKeyOrFail(containerId); ar.setPageAccessLevels(ngc); String rid = ar.reqParam("rid"); ReminderMgr rMgr = ngc.getReminderMgr(); ReminderRecord rRec = rMgr.findReminderByID(rid); if (rRec != null) { rMgr.removeReminder(rid); message = NGWebUtils.getJSONMessage(Constant.SUCCESS, "", ""); } else { throw new NGException( "nugen.exception.no.attachment.found", new Object[] {rid, ngc.getFullName()}); } ngc.saveContent(ar, "Modified attachments"); } catch (Exception ex) { message = NGWebUtils.getExceptionMessageForAjaxRequest(ex, ar.getLocale()); ar.logException("Caught by deleteReminder.ajax", ex); } NGWebUtils.sendResponse(ar, message); }