HttpServletRequest request,
HttpServletResponse response)
throws Exception {
DynaActionForm f = (DynaActionForm) form;
Modul m = new Modul();
m.setModulId((Integer) f.get("modulId"));
m.setMandantId((Integer) request.getSession().getAttribute(Constants.MANDANT_ID));
m = service.getById(m);
if(m == null) {
service.populate(request, f);
return mapping.findForward(Constants.LIST);
}
ActionMessages messages = new ActionMessages();
messages.add(ActionMessages.GLOBAL_MESSAGE,
new ActionMessage("messages.question.delete", m.getName()));
saveMessages(request, messages);
request.setAttribute(Constants.ACTION, Constants.MODUL_ACTION);
request.setAttribute(Constants.DISPATCH_YES, Constants.DELETE);
request.setAttribute(Constants.DISPATCH_NO, Constants.LIST);
request.setAttribute(Constants.ID_NAME, Constants.MODUL_ID);
request.setAttribute(Constants.ID_VALUE, m.getModulId());
return mapping.findForward(Constants.QUESTION);
}