Index: lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/controller/AuthoringController.java =================================================================== diff -u -rc6221c2f0d3175c3d6fa934a680047845a44d6f4 -r3850a2def809bcb85d27c5f796c5e28ac7d36f18 --- lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/controller/AuthoringController.java (.../AuthoringController.java) (revision c6221c2f0d3175c3d6fa934a680047845a44d6f4) +++ lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/controller/AuthoringController.java (.../AuthoringController.java) (revision 3850a2def809bcb85d27c5f796c5e28ac7d36f18) @@ -50,6 +50,7 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; /** * This action handles all the authoring actions, which include opening author, saving, uploading instruction files and @@ -168,45 +169,45 @@ return "pages/authoring/authoring"; } - @RequestMapping("/editPage") + @RequestMapping(path = "/editPage", method = RequestMethod.POST) public String editPage(@ModelAttribute AuthoringForm authoringForm, HttpServletRequest request) throws Exception { super.editPage(authoringForm, request); Long currentPageUid = WebUtil.readLongParam(request, WikiConstants.ATTR_CURRENT_WIKI); return returnToWiki(authoringForm, request, currentPageUid); } - @RequestMapping("/revertPage") + @RequestMapping(path = "/revertPage", method = RequestMethod.POST) public String revertPage(@ModelAttribute AuthoringForm authoringForm, HttpServletRequest request) throws Exception { super.revertPage(authoringForm, request); return unspecified(authoringForm, request); } - @RequestMapping("/comparePage") + @RequestMapping(path = "/comparePage") public String comparePage(@ModelAttribute AuthoringForm authoringForm, HttpServletRequest request) throws Exception { super.comparePage(authoringForm, request); return "pages/wiki/compare"; } - @RequestMapping("/viewPage") + @RequestMapping(path = "/viewPage") public String viewPage(@ModelAttribute AuthoringForm authoringForm, HttpServletRequest request) throws Exception { super.viewPage(authoringForm, request); return "pages/wiki/viewWiki"; } - @RequestMapping("/changePage") + @RequestMapping(path = "/changePage", method = RequestMethod.POST) public String changePage(@ModelAttribute AuthoringForm authoringForm, HttpServletRequest request) throws Exception { Long pageUid = super.changePage(authoringForm, request); return this.returnToWiki(authoringForm, request, pageUid); } - @RequestMapping("/addPage") + @RequestMapping(path = "/addPage", method = RequestMethod.POST) public String addPage(@ModelAttribute AuthoringForm authoringForm, HttpServletRequest request) throws Exception { Long currentWikiPageId = super.addPage(authoringForm, request); return returnToWiki(authoringForm, request, currentWikiPageId); } - @RequestMapping("/removePage") + @RequestMapping(path = "/removePage", method = RequestMethod.POST) public String removePage(@ModelAttribute AuthoringForm authoringForm, HttpServletRequest request) throws Exception { Long toolContentID = new Long(WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID)); @@ -224,15 +225,15 @@ return this.returnToWiki(authoringForm, request, null); } - @RequestMapping("/restorePage") + @RequestMapping(path = "/restorePage", method = RequestMethod.POST) public String restorePage(@ModelAttribute AuthoringForm authoringForm, HttpServletRequest request) throws Exception { super.restorePage(authoringForm, request); Long currentWikiPageId = WebUtil.readLongParam(request, WikiConstants.ATTR_CURRENT_WIKI); return this.returnToWiki(authoringForm, request, currentWikiPageId); } - @RequestMapping("/toggleLearnerSubsciption") + @RequestMapping(path = "/toggleLearnerSubsciption", method = RequestMethod.POST) public String toggleLearnerSubsciption(@ModelAttribute AuthoringForm authoringForm, HttpServletRequest request) throws Exception { super.toggleLearnerSubsciption(authoringForm, request); @@ -241,7 +242,7 @@ } @Override - @RequestMapping("/notifyWikiChange") + @RequestMapping(path = "/notifyWikiChange", method = RequestMethod.POST) public void notifyWikiChange(Long toolSessionID, String subjectLangKey, String bodyLangKey, WikiUser wikiUser, HttpServletRequest request) throws Exception { super.notifyWikiChange(toolSessionID, subjectLangKey, bodyLangKey, wikiUser, request); @@ -275,7 +276,7 @@ * * The WikiPage content is not saved here as that is done in the WikiPageAction */ - @RequestMapping("/updateContent") + @RequestMapping(path = "/updateContent", method = RequestMethod.POST) public String updateContent(@ModelAttribute AuthoringForm authoringForm, HttpServletRequest request, HttpServletResponse response) { // TODO need error checking. Index: lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/controller/LearningController.java =================================================================== diff -u -rc6221c2f0d3175c3d6fa934a680047845a44d6f4 -r3850a2def809bcb85d27c5f796c5e28ac7d36f18 --- lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/controller/LearningController.java (.../LearningController.java) (revision c6221c2f0d3175c3d6fa934a680047845a44d6f4) +++ lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/controller/LearningController.java (.../LearningController.java) (revision 3850a2def809bcb85d27c5f796c5e28ac7d36f18) @@ -65,6 +65,7 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.context.WebApplicationContext; /** @@ -249,58 +250,58 @@ return "pages/learning/wiki"; } - @RequestMapping("/editPage") + @RequestMapping(path = "/editPage", method = RequestMethod.POST) public String editPage(@ModelAttribute LearningForm learningForm, HttpServletRequest request) throws Exception { super.editPage(learningForm, request); Long currentWikiPageId = WebUtil.readLongParam(request, WikiConstants.ATTR_CURRENT_WIKI); return returnToWiki(learningForm, request, currentWikiPageId); } - @RequestMapping("/revertPage") + @RequestMapping(path = "/revertPage", method = RequestMethod.POST) public String revertPage(@ModelAttribute LearningForm learningForm, HttpServletRequest request) throws Exception { super.revertPage(learningForm, request); return unspecified(learningForm, request); } - @RequestMapping("/comparePage") + @RequestMapping(path = "/comparePage") public String comparePage(@ModelAttribute LearningForm learningForm, HttpServletRequest request) throws Exception { super.comparePage(learningForm, request); return "pages/wiki/compare"; } - @RequestMapping("/viewPage") + @RequestMapping(path = "/viewPage") public String viewPage(@ModelAttribute LearningForm learningForm, HttpServletRequest request) throws Exception { super.viewPage(learningForm, request); return "pages/wiki/viewWiki"; } - @RequestMapping("/changePage") + @RequestMapping(path = "/changePage", method = RequestMethod.POST) public String changePage(@ModelAttribute LearningForm learningForm, HttpServletRequest request) throws Exception { Long pageUid = super.changePage(learningForm, request); return this.returnToWiki(learningForm, request, pageUid); } - @RequestMapping("/addPage") + @RequestMapping(path = "/addPage", method = RequestMethod.POST) public String addPage(@ModelAttribute LearningForm learningForm, HttpServletRequest request) throws Exception { Long currentWikiPageId = super.addPage(learningForm, request); return returnToWiki(learningForm, request, currentWikiPageId); } - @RequestMapping("/removePage") + @RequestMapping(path = "/removePage", method = RequestMethod.POST) public String removePage(@ModelAttribute LearningForm learningForm, HttpServletRequest request) throws Exception { Long currentPageUid = WebUtil.readLongParam(request, WikiConstants.ATTR_CURRENT_WIKI); super.removePage(learningForm, request); return this.returnToWiki(learningForm, request, currentPageUid); } - @RequestMapping("/restorePage") + @RequestMapping(path = "/restorePage", method = RequestMethod.POST) public String restorePage(@ModelAttribute LearningForm learningForm, HttpServletRequest request) throws Exception { super.restorePage(learningForm, request); Long currentWikiPageId = WebUtil.readLongParam(request, WikiConstants.ATTR_CURRENT_WIKI); return this.returnToWiki(learningForm, request, currentWikiPageId); } - @RequestMapping("/toggleLearnerSubsciption") + @RequestMapping(path = "/toggleLearnerSubsciption", method = RequestMethod.POST) public String toggleLearnerSubsciption(@ModelAttribute LearningForm learningForm, HttpServletRequest request) throws Exception { super.toggleLearnerSubsciption(learningForm, request); @@ -309,7 +310,7 @@ } @Override - @RequestMapping("/notifyWikiChange") + @RequestMapping(path = "/notifyWikiChange", method = RequestMethod.POST) public void notifyWikiChange(Long toolSessionID, String subjectLangKey, String bodyLangKey, WikiUser wikiUser, HttpServletRequest request) throws Exception { super.notifyWikiChange(toolSessionID, subjectLangKey, bodyLangKey, wikiUser, request); @@ -418,7 +419,7 @@ /** * Submit reflections */ - @RequestMapping("/submitReflection") + @RequestMapping(path = "/submitReflection", method = RequestMethod.POST) public String submitReflection(@ModelAttribute LearningForm learningForm, HttpServletRequest request, HttpServletResponse response) { Index: lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/controller/MonitoringController.java =================================================================== diff -u -rc6221c2f0d3175c3d6fa934a680047845a44d6f4 -r3850a2def809bcb85d27c5f796c5e28ac7d36f18 --- lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/controller/MonitoringController.java (.../MonitoringController.java) (revision c6221c2f0d3175c3d6fa934a680047845a44d6f4) +++ lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/controller/MonitoringController.java (.../MonitoringController.java) (revision 3850a2def809bcb85d27c5f796c5e28ac7d36f18) @@ -61,6 +61,7 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; /** @@ -138,63 +139,63 @@ return "pages/monitoring/monitoring"; } - @RequestMapping("/editPage") + @RequestMapping(path = "/editPage", method = RequestMethod.POST) public String editPage(@ModelAttribute MonitoringForm monitoringForm, HttpServletRequest request) throws Exception { super.editPage(monitoringForm, request); Long currentWikiPageId = WebUtil.readLongParam(request, WikiConstants.ATTR_CURRENT_WIKI); return returnToWiki(monitoringForm, request, currentWikiPageId); } - @RequestMapping("/revertPage") + @RequestMapping(path = "/revertPage", method = RequestMethod.POST) public String revertPage(@ModelAttribute MonitoringForm monitoringForm, HttpServletRequest request) throws Exception { super.revertPage(monitoringForm, request); return unspecified(monitoringForm, request); } - @RequestMapping("/comparePage") + @RequestMapping(path = "/comparePage") public String comparePage(@ModelAttribute MonitoringForm monitoringForm, HttpServletRequest request) throws Exception { super.comparePage(monitoringForm, request); return "pages/wiki/compare"; } - @RequestMapping("/viewPage") + @RequestMapping(path = "/viewPage") public String viewPage(@ModelAttribute MonitoringForm monitoringForm, HttpServletRequest request) throws Exception { super.viewPage(monitoringForm, request); return "pages/wiki/viewWiki"; } - @RequestMapping("/changePage") + @RequestMapping(path = "/changePage", method = RequestMethod.POST) public String changePage(@ModelAttribute MonitoringForm monitoringForm, HttpServletRequest request) throws Exception { Long pageUid = super.changePage(monitoringForm, request); return this.returnToWiki(monitoringForm, request, pageUid); } - @RequestMapping("/addPage") + @RequestMapping(path = "/addPage", method = RequestMethod.POST) public String addPage(@ModelAttribute MonitoringForm monitoringForm, HttpServletRequest request) throws Exception { Long currentWikiPageId = super.addPage(monitoringForm, request); return returnToWiki(monitoringForm, request, currentWikiPageId); } - @RequestMapping("/removePage") + @RequestMapping(path = "/removePage", method = RequestMethod.POST) public String removePage(@ModelAttribute MonitoringForm monitoringForm, HttpServletRequest request) throws Exception { Long currentPageUid = WebUtil.readLongParam(request, WikiConstants.ATTR_CURRENT_WIKI); super.removePage(monitoringForm, request); return this.returnToWiki(monitoringForm, request, currentPageUid); } - @RequestMapping("/restorePage") + @RequestMapping(path = "/restorePage", method = RequestMethod.POST) public String restorePage(@ModelAttribute MonitoringForm monitoringForm, HttpServletRequest request) throws Exception { super.restorePage(monitoringForm, request); Long currentWikiPageId = WebUtil.readLongParam(request, WikiConstants.ATTR_CURRENT_WIKI); return this.returnToWiki(monitoringForm, request, currentWikiPageId); } - - @RequestMapping("/toggleLearnerSubsciption") + + @RequestMapping(path = "/toggleLearnerSubsciption", method = RequestMethod.POST) public String toggleLearnerSubsciption(@ModelAttribute MonitoringForm monitoringForm, HttpServletRequest request) throws Exception { super.toggleLearnerSubsciption(monitoringForm, request); @@ -203,7 +204,7 @@ } @Override - @RequestMapping("/notifyWikiChange") + @RequestMapping(path = "/notifyWikiChange", method = RequestMethod.POST) public void notifyWikiChange(Long toolSessionID, String subjectLangKey, String bodyLangKey, WikiUser wikiUser, HttpServletRequest request) throws Exception { super.notifyWikiChange(toolSessionID, subjectLangKey, bodyLangKey, wikiUser, request); Index: lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/controller/PedagogicalPlannerController.java =================================================================== diff -u -rada9f9222f66994c94c2989aea922429377f06ed -r3850a2def809bcb85d27c5f796c5e28ac7d36f18 --- lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/controller/PedagogicalPlannerController.java (.../PedagogicalPlannerController.java) (revision ada9f9222f66994c94c2989aea922429377f06ed) +++ lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/controller/PedagogicalPlannerController.java (.../PedagogicalPlannerController.java) (revision 3850a2def809bcb85d27c5f796c5e28ac7d36f18) @@ -40,6 +40,7 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; /** * @author Marcin Cieslak @@ -70,7 +71,7 @@ return "pages/authoring/pedagogicalPlannerForm"; } - @RequestMapping("/saveOrUpdatePedagogicalPlannerForm") + @RequestMapping(path = "/saveOrUpdatePedagogicalPlannerForm", method = RequestMethod.POST) public String saveOrUpdatePedagogicalPlannerForm(@ModelAttribute WikiPedagogicalPlannerForm plannerForm, HttpServletRequest request, HttpServletResponse response) throws IOException { // ActionMessages errors = plannerForm.validate();