Author: bbrossaud Date: 2010-07-15 11:14:24 +0200 (Thu, 15 Jul 2010) New Revision: 84 Url: http://chorem.org/repositories/revision/bow/84 Log: moved regenerate token in preferences page Modified: trunk/src/main/java/org/chorem/bow/ControllerServlet.java trunk/src/main/webapp/bookmarkHome.jsp trunk/src/main/webapp/bookmarkSearch.jsp trunk/src/main/webapp/preferences.jsp Modified: trunk/src/main/java/org/chorem/bow/ControllerServlet.java =================================================================== --- trunk/src/main/java/org/chorem/bow/ControllerServlet.java 2010-07-15 08:43:11 UTC (rev 83) +++ trunk/src/main/java/org/chorem/bow/ControllerServlet.java 2010-07-15 09:14:24 UTC (rev 84) @@ -163,6 +163,7 @@ log.debug("Going to actionGenerateToken"); } this.actionGenerateToken(request, response, user, session); + request.getRequestDispatcher("preferences.jsp").forward(request, response); } else if (action.equals("deleteTag") && user != null) { if (log.isDebugEnabled()) { log.debug("Going to actionDeleteTag"); @@ -492,7 +493,6 @@ tokenActions.setPermanentToken(""); } } - redirectToTheGoodPage(request, response); } protected void actionModifyBookmark(HttpServletRequest request, HttpServletResponse response, User user) @@ -1025,11 +1025,11 @@ } } } - proxy.store(newUser); + newUser = proxy.store(newUser); + session.setAttribute("user", newUser); - session.setAttribute("user", newUser); preference = proxy.restore(Preference.class, newUser.getWikittyId()); - request.setAttribute("preference", preference); + session.setAttribute("preference", preference); } protected void sendMail(String email, String password) Modified: trunk/src/main/webapp/bookmarkHome.jsp =================================================================== --- trunk/src/main/webapp/bookmarkHome.jsp 2010-07-15 08:43:11 UTC (rev 83) +++ trunk/src/main/webapp/bookmarkHome.jsp 2010-07-15 09:14:24 UTC (rev 84) @@ -129,7 +129,6 @@ <li><a href="bow?action=preferences">Preferences</a></li> <li><a href="javascript:var%20url=location.href;var%20nameAndTags=prompt('Entrez%20le%20nom%20du%20lien%20et%20la%20liste%20des%20tags%20sous%20la%20forme:%20name|tag1%20tag2%20tag3',%20document.title+'|');if%20(nameAndTags!=(document.title+'|')){var%20link='<%=url%>bow?action=addUrl&token=<%=temporaryToken%>&url='+encodeURIComponent(url)+'&nameAndTags='+encodeURIComponent(nameAndTags);var%20script=document.createElement('script');script.src=link;script.type='text/javascript';document.body.appendChild(script);}void(0);">Temporary token</a></li> <li><a href="javascript:var%20url=location.href;var%20nameAndTags=prompt('Entrez%20le%20nom%20du%20lien%20et%20la%20liste%20des%20tags%20sous%20la%20forme:%20name|tag1%20tag2%20tag3',%20document.title+'|');if%20(nameAndTags!=(document.title+'|')){var%20link='<%=url%>bow?action=addUrl&token=<%=permanentToken%>&url='+encodeURIComponent(url)+'&nameAndTags='+encodeURIComponent(nameAndTags);var%20script=document.createElement('script');script.src=link;script.type='text/javascript';document.body.appendChild(script);}void(0);">Current permanent token</a></li> - <li><a href="bow?action=generateToken">Regenerate permanent token</a></li> </ul> <div id="nuage"> <jsp:include page="tagsCloud.jsp" flush="true" /> Modified: trunk/src/main/webapp/bookmarkSearch.jsp =================================================================== --- trunk/src/main/webapp/bookmarkSearch.jsp 2010-07-15 08:43:11 UTC (rev 83) +++ trunk/src/main/webapp/bookmarkSearch.jsp 2010-07-15 09:14:24 UTC (rev 84) @@ -111,7 +111,6 @@ <li><a href="bow?action=preferences">Preferences</a></li> <li><a href="javascript:var%20url=location.href;var%20nameAndTags=prompt('Entrez%20le%20nom%20du%20lien%20et%20la%20liste%20des%20tags%20sous%20la%20forme:%20name|tag1%20tag2%20tag3',%20document.title+'|');var%20link='<%=url%>bow?action=addUrl&token=<%=temporaryToken%>&url='+encodeURIComponent(url)+'&nameAndTags='+encodeURIComponent(nameAndTags);var%20script=document.createElement('script');script.src=link;script.type='text/javascript';document.body.appendChild(script);void(0);">Temporary token</a></li> <li><a href="javascript:var%20url=location.href;var%20nameAndTags=prompt('Entrez%20le%20nom%20du%20lien%20et%20la%20liste%20des%20tags%20sous%20la%20forme:%20name|tag1%20tag2%20tag3',%20document.title+'|');var%20link='<%=url%>bow?action=addUrl&token=<%=permanentToken%>&url='+encodeURIComponent(url)+'&nameAndTags='+encodeURIComponent(nameAndTags);var%20script=document.createElement('script');script.src=link;script.type='text/javascript';document.body.appendChild(script);void(0);">Current permanent token</a></li> - <li><a href="bow?action=generateToken&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>">Regenerate permanent token</a></li> </ul> <div id="nuage"> <jsp:include page="tagsCloud.jsp" flush="true"> Modified: trunk/src/main/webapp/preferences.jsp =================================================================== --- trunk/src/main/webapp/preferences.jsp 2010-07-15 08:43:11 UTC (rev 83) +++ trunk/src/main/webapp/preferences.jsp 2010-07-15 09:14:24 UTC (rev 84) @@ -55,8 +55,11 @@ <input type=password name="newPassword"/> <p>Confirm new password</p> <input type=password name="confirmNewPassword"/> - <br/> + <br/> <br /> + <a href="bow?action=generateToken">Regenerate permanent token</a> + <br /> <br /> + <h1>Site look</h1> <p>Site color</p> <input type="text" name="colors" value="<%=preference.getColors()%>"/>