comparison src/main/java/de/mpiwg/web/jsp/BooksPage.java @ 22:2c6f44ef34ab

new: add comment textarea
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Tue, 23 Jun 2015 16:18:52 +0200
parents 5b1856cd6b4f
children 07f7594ba56e
comparison
equal deleted inserted replaced
21:5b1856cd6b4f 22:2c6f44ef34ab
54 private String level1Filter = new String(); 54 private String level1Filter = new String();
55 private String level2Filter = new String(); 55 private String level2Filter = new String();
56 private String periodFilter = new String(); 56 private String periodFilter = new String();
57 private String editionFilter = new String(); 57 private String editionFilter = new String();
58 58
59
60 private String filteringMessage; 59 private String filteringMessage;
61
62 60
63 61
64 public void loadParameters(HttpServletRequest request, HttpServletResponse response){ 62 public void loadParameters(HttpServletRequest request, HttpServletResponse response){
65 this.request = request; 63 this.request = request;
66 this.response = response; 64 this.response = response;
71 this.adminTypeFilter = getParameter("adminTypeFilter"); 69 this.adminTypeFilter = getParameter("adminTypeFilter");
72 this.level1Filter = getParameter("level1Filter"); 70 this.level1Filter = getParameter("level1Filter");
73 this.level2Filter = getParameter("level2Filter"); 71 this.level2Filter = getParameter("level2Filter");
74 this.periodFilter = getParameter("periodFilter"); 72 this.periodFilter = getParameter("periodFilter");
75 this.editionFilter = getParameter("editionFilter"); 73 this.editionFilter = getParameter("editionFilter");
76 74
77 } 75 }
78 76
79 77
80 78
81 public void filter(){ 79 public void filter(){
260 }catch (Exception e) { 258 }catch (Exception e) {
261 addMsg("There is an internal error: " + e.getLocalizedMessage()); 259 addMsg("There is an internal error: " + e.getLocalizedMessage());
262 e.printStackTrace(); 260 e.printStackTrace();
263 } 261 }
264 262
265 logger.debug("toc_correction:"+DBService.getInstance().getBook(tocBookId).getTocCorrection()); 263 //logger.debug("toc_correction:"+DBService.getInstance().getBook(tocBookId).getTocCorrection());
266 264
267 } 265 }
268 266
269 267
270 public void unSetTocCorrection() { 268 public void unSetTocCorrection() {
280 } 278 }
281 279
282 } 280 }
283 281
284 public void saveComment() { 282 public void saveComment() {
285 // TODO Auto-generated method stub 283
286 logger.debug("saveComment"); 284 String bookComment = getParameter("bookComment");
285 String currentBookId = getParameter("currentBookId");
286
287 logger.debug("saveComment. currentBookId=" + currentBookId + ", bookComment: "+ bookComment);
288
289 try {
290 DBService.getInstance().updateComment(currentBookId, bookComment);
291
292 } catch (Exception e) {
293 addMsg("There is an internal error: " + e.getLocalizedMessage());
294 e.printStackTrace();
295 }
296
287 } 297 }
288 298
289 299
290 300
291 public void sortByBookIdUp() { 301 public void sortByBookIdUp() {