r31 - in trunk/src/main: java/org/chorem/bow webapp/css
Author: bbrossaud Date: 2010-05-21 10:09:47 +0200 (Fri, 21 May 2010) New Revision: 31 Url: http://chorem.org/repositories/revision/bow/31 Log: resolved problems with the cirtical actions in the search jsp page Modified: trunk/src/main/java/org/chorem/bow/ControllerServlet.java trunk/src/main/webapp/css/styles.css Modified: trunk/src/main/java/org/chorem/bow/ControllerServlet.java =================================================================== --- trunk/src/main/java/org/chorem/bow/ControllerServlet.java 2010-05-20 15:11:58 UTC (rev 30) +++ trunk/src/main/java/org/chorem/bow/ControllerServlet.java 2010-05-21 08:09:47 UTC (rev 31) @@ -81,39 +81,32 @@ log.debug("Going to actionAddUrl"); } this.actionAddUrl(request, response, user); - request.getRequestDispatcher("search.jsp").forward(request, response); - } else if (action.equals("search") && user != null) { if (log.isDebugEnabled()) { log.debug("Going to actionSearch"); } this.actionSearch(request, response, user); request.getRequestDispatcher("search.jsp").forward(request, response); - } else if (action.equals("generateToken") && user != null) { if (log.isDebugEnabled()) { log.debug("Going to actionGenerateToken"); } this.actionGenerateToken(request, response, user, session); - request.getRequestDispatcher("search.jsp").forward(request, response); } else if (action.equals("deleteTag") && user != null) { if (log.isDebugEnabled()) { log.debug("Going to actionDeleteTag"); } this.actionDeleteTag(request, response, user); - request.getRequestDispatcher("search.jsp").forward(request, response); } else if (action.equals("removeBookmark") && user != null) { if (log.isDebugEnabled()) { log.debug("Going to actionRemoveBookmark"); } this.actionRemoveBookmark(request, response, user); - request.getRequestDispatcher("search.jsp").forward(request, response); } else if (action.equals("editBookmark") && user != null) { if (log.isDebugEnabled()) { log.debug("Going to actionEditBookmark"); } this.actionEditBookmark(request, response, user); - request.getRequestDispatcher("search.jsp").forward(request, response); } else if (action.equals("orderAsc") && user != null) { if (log.isDebugEnabled()) { log.debug("Going to actionOrderAsc"); @@ -302,12 +295,11 @@ if (bookmark != null) { BookmarkActions.updateBookmark(bookmark, nameAndTags); proxy.store(bookmark); - Criteria criteria = Search.query().eq(Bookmark.FQ_FIELD_EMAIL, user.getEmail()).criteria(); - List<Bookmark> bookList = proxy.findAllByCriteria(Bookmark.class, criteria).getAll(); // select all bookmarks by user - createBookmarkActions(request, bookList); } } } + String searchLine = request.getParameter("searchLine"); + response.sendRedirect("bow?action=search&searchLine=" + searchLine); } protected void actionRemoveBookmark(HttpServletRequest request, HttpServletResponse response, User user) @@ -316,12 +308,9 @@ if (bookmarkId != null && !bookmarkId.isEmpty()) { WikittyProxy proxy = model.getProxy(); proxy.delete(bookmarkId); - Criteria criteria = Search.query().eq(Bookmark.FQ_FIELD_EMAIL, user.getEmail()).criteria(); - List<Bookmark> bookList = proxy.findAllByCriteria(Bookmark.class, criteria).getAll(); // select all bookmarks by user - if (bookList != null) { - createBookmarkActions(request, bookList); - } } + String searchLine = request.getParameter("searchLine"); + response.sendRedirect("bow?action=search&searchLine=" + searchLine); } protected void actionDeleteTag(HttpServletRequest request, HttpServletResponse response, User user) @@ -335,12 +324,11 @@ if (bookmark != null) { bookmark.removeTags(tag); proxy.store(bookmark); - Criteria criteria = Search.query().eq(Bookmark.FQ_FIELD_EMAIL, user.getEmail()).criteria(); - List<Bookmark> bookList = proxy.findAllByCriteria(Bookmark.class, criteria).getAll(); // select all bookmarks by user - createBookmarkActions(request, bookList); } } } + String searchLine = request.getParameter("searchLine"); + response.sendRedirect("bow?action=search&searchLine=" + searchLine); } @@ -372,7 +360,8 @@ } } session.setAttribute("tokenActions", tokenActions); - actionSearch(request, response, user); + String searchLine = request.getParameter("searchLine"); + response.sendRedirect("bow?action=search&searchLine=" + searchLine); } /* @param request servlet request @@ -382,7 +371,8 @@ protected void actionAddUrl(HttpServletRequest request, HttpServletResponse response, User user) throws IOException, ServletException { addUrl(request, user); - actionSearch(request, response, user); + String searchLine = request.getParameter("searchLine"); + response.sendRedirect("bow?action=search&searchLine=" + searchLine); } protected void addUrl(HttpServletRequest request, User user) { Modified: trunk/src/main/webapp/css/styles.css =================================================================== --- trunk/src/main/webapp/css/styles.css 2010-05-20 15:11:58 UTC (rev 30) +++ trunk/src/main/webapp/css/styles.css 2010-05-21 08:09:47 UTC (rev 31) @@ -84,8 +84,6 @@ #table { margin: 0; padding: 0; - background-color:#eaf3f9; - display: inline-block; float: left; position: relative; width: 80%;
participants (1)
-
bbrossaudï¼ users.chorem.org