ActionErrors actionErrors = new ActionErrors(); actionErrors.add("error.teacher.siteAdministration.editItemFilePermissions.unableToChangeFilePermissions", new ActionError("error.teacher.siteAdministration.editItemFilePermissions.unableToChangeFilePermissions")); saveErrors(request, actionErrors); final FileItem fileItem = (FileItem) rootDomainObject.readFileByOID(fileItemId); request.setAttribute("fileItem", fileItem);
addErrorMessage(request, "error.teacher.siteAdministration.editItemFilePermissions.unableToChangeFilePermissions");
    public ActionForward editItemFilePermissions(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)    		throws Exception {	final Item item = selectItem(request);        final DynaActionForm editItemFilePermissionsForm = (DynaActionForm) form;        final Integer fileItemId = (Integer) editItemFilePermissionsForm.get("fileItemId");        final FileItemPermittedGroupType permittedGroupType = FileItemPermittedGroupType.valueOf(editItemFilePermissionsForm.getString("permittedGroupType"));        try {            executeService(request, "EditItemFilePermissions", new Object[] { item.getIdInternal(), fileItemId, permittedGroupType });        } catch (FileManagerException ex) {            ActionErrors actionErrors = new ActionErrors();            actionErrors.add("error.teacher.siteAdministration.editItemFilePermissions.unableToChangeFilePermissions",                            new ActionError("error.teacher.siteAdministration.editItemFilePermissions.unableToChangeFilePermissions"));            saveErrors(request, actionErrors);            final FileItem fileItem = (FileItem) rootDomainObject.readFileByOID(fileItemId);            request.setAttribute("fileItem", fileItem);            return mapping.findForward("editFile");        }        return mapping.findForward("section");    }