Index: lams_tool_forum/conf/xdoclet/struts-actions.xml =================================================================== diff -u -r782adea1cca29c0a511e5ba358bfefb9a1dcc2c2 -r671e0f31315ba99ec13f82789869ce2a01e0ea04 --- lams_tool_forum/conf/xdoclet/struts-actions.xml (.../struts-actions.xml) (revision 782adea1cca29c0a511e5ba358bfefb9a1dcc2c2) +++ lams_tool_forum/conf/xdoclet/struts-actions.xml (.../struts-actions.xml) (revision 671e0f31315ba99ec13f82789869ce2a01e0ea04) @@ -53,7 +53,7 @@ scope="request" validate="false" parameter="deleteOnlineFile" > - + - + Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/util/ForumConstants.java =================================================================== diff -u -rf6f0e93d2134d055aadd9414aee1b588f0669c19 -r671e0f31315ba99ec13f82789869ce2a01e0ea04 --- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/util/ForumConstants.java (.../ForumConstants.java) (revision f6f0e93d2134d055aadd9414aee1b588f0669c19) +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/util/ForumConstants.java (.../ForumConstants.java) (revision 671e0f31315ba99ec13f82789869ce2a01e0ea04) @@ -87,6 +87,7 @@ public static final String ATTR_TOPIC = "topic"; public static final String ATTR_USER= "user"; public static final String ATTR_REPORT = "report"; + public static final String ATTR_FILE_TYPE_FLAG = "fileTypeFlag"; public static final String PARAM_UPDATE_MODE = "updateMode"; Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/AuthoringAction.java =================================================================== diff -u -r5ee472bdb1fdd38e158d594915e5b10354042f15 -r671e0f31315ba99ec13f82789869ce2a01e0ea04 --- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/AuthoringAction.java (.../AuthoringAction.java) (revision 5ee472bdb1fdd38e158d594915e5b10354042f15) +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/AuthoringAction.java (.../AuthoringAction.java) (revision 671e0f31315ba99ec13f82789869ce2a01e0ea04) @@ -448,20 +448,6 @@ //add to attachmentList attachmentList.add(att); - //update Html FORM, this will echo back to web page for display - List onlineFileList = new ArrayList(); - List offlineFileList = new ArrayList(); - iter = attachmentList.iterator(); - while(iter.hasNext()){ - Attachment attFile = (Attachment) iter.next(); - if(StringUtils.equalsIgnoreCase(attFile.getFileType(),IToolContentHandler.TYPE_OFFLINE)) - offlineFileList.add(attFile); - else - onlineFileList.add(attFile); - } - forumForm.setOnlineFileList(onlineFileList); - forumForm.setOfflineFileList(offlineFileList); - return mapping.findForward("success"); } @@ -512,24 +498,18 @@ //first check exist attachment and delete old one (if exist) to deletedAttachmentList Iterator iter = attachmentList.iterator(); Attachment existAtt; - List leftAttachments = new ArrayList(); while(iter.hasNext()){ existAtt = (Attachment) iter.next(); if(existAtt.getFileUuid().equals(uuID) && existAtt.getFileVersionId().equals(versionID)){ //if there is same name attachment, delete old one deleteAttachmentList.add(existAtt); iter.remove(); - }else if(StringUtils.equals(existAtt.getFileType(),type) ){ - leftAttachments.add(existAtt); } } - - if(StringUtils.equals(IToolContentHandler.TYPE_OFFLINE,type)){ - request.setAttribute("offlineFileList",leftAttachments); - }else{ - request.setAttribute("onlineFileList",leftAttachments); - } + + request.setAttribute(ForumConstants.ATTR_FILE_TYPE_FLAG, type); + request.setAttribute(ForumConstants.ATTR_SESSION_MAP_ID, sessionMapID); return mapping.findForward("success"); } @@ -900,7 +880,6 @@ //define it later mode(TEACHER) skip below validation. String modeStr = request.getParameter(AttributeNames.ATTR_MODE); if(StringUtils.equals(modeStr, ToolAccessMode.TEACHER.toString())){ - mapping.setInput("/defineLater"); return errors; } if(!form.getForum().isAllowRichEditor()){ Index: lams_tool_forum/web/WEB-INF/struts-config.xml =================================================================== diff -u -r782adea1cca29c0a511e5ba358bfefb9a1dcc2c2 -r671e0f31315ba99ec13f82789869ce2a01e0ea04 --- lams_tool_forum/web/WEB-INF/struts-config.xml (.../struts-config.xml) (revision 782adea1cca29c0a511e5ba358bfefb9a1dcc2c2) +++ lams_tool_forum/web/WEB-INF/struts-config.xml (.../struts-config.xml) (revision 671e0f31315ba99ec13f82789869ce2a01e0ea04) @@ -99,15 +99,15 @@ scope="request" validate="false" parameter="deleteOnlineFile" > - + - + +