public ActionForward edit(ActionMapping mapping, ActionForm form,HttpServletRequest req, HttpServletResponse resp) {
ImageRecognitionInteractionEnterOrEditForm f = (ImageRecognitionInteractionEnterOrEditForm)form;
ImageRecognitionCommandEntry commandEntry = (ImageRecognitionCommandEntry)commandEntryFromRequest(req);
if(commandEntry == null){
MessageResources resources = getResources(req);
throw new InputException(resources.getMessage(locale, "smssvc.editedInteractionDoesNotExistAnymore"));
}
checkAccessRights(req, commandEntry.getGroup());
f.setCommandEntryId(commandEntry.getId());
f.setSortLabel(commandEntry.getSortLabel());
f.setFolderSuffix(Integer.toString(commandEntry.getFolderSuffix()));
req.getSession().setAttribute("enterOrEdit", "edit");
req.getSession().setAttribute("formActionPath", req.getParameter("formActionPath"));
return mapping.findForward("edit");
}