Index: lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbAuthoringStarterAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/Attic/NbAuthoringStarterAction.java,v diff -u -r1.8 -r1.9 --- lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbAuthoringStarterAction.java 2 Aug 2005 06:34:18 -0000 1.8 +++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbAuthoringStarterAction.java 3 Aug 2005 03:09:58 -0000 1.9 @@ -83,6 +83,8 @@ static Logger logger = Logger.getLogger(NbAuthoringAction.class.getName()); + public final static String FORM="NbAuthoringForm"; + /** * This struts actionservlet gets called when the author double clicks * on the tool icon. If the toolContentId already exists in the tool content @@ -100,8 +102,8 @@ MessageResources resources = getResources(request); - NbAuthoringForm nbForm = (NbAuthoringForm)form; - + //to ensure that we are working with a new form, not one from previous session + NbAuthoringForm nbForm = new NbAuthoringForm(); NbWebUtil.cleanAuthoringSession(request); Long contentId = NbWebUtil.convertToLong(request.getParameter(NoticeboardConstants.TOOL_CONTENT_ID)); @@ -122,15 +124,13 @@ */ nbForm.setDefineLater((String)request.getParameter(NoticeboardConstants.DEFINE_LATER)); - - - request.getSession().setAttribute(NoticeboardConstants.TOOL_CONTENT_ID, contentId); /* * Retrieve the Service */ INoticeboardService nbService = NoticeboardServiceProxy.getNbService(getServlet().getServletContext()); + Map attachmentMap = nbForm.getAttachments(); if (!contentExists(nbService, contentId)) { @@ -154,7 +154,9 @@ //initialise the values in the form, so the values will be shown in the jsp nbForm.populateFormWithNbContentValues(nbContentNew); - + + + } else //content already exists on the database @@ -189,8 +191,7 @@ } //Setup the map containing the files that have been uploaded for this particular tool content id - Map attachmentMap = nbForm.getAttachments(); - + List attachmentIdList = nbService.getAttachmentIdsFromContent(nb); for (int i=0; i