예제 #1
0
  @SuppressWarnings("unchecked")
  @RequestMapping(method = RequestMethod.POST)
  public String handlePost(@ModelAttribute("nbid") NotebookIdBean bean, ModelMap model) {

    User current = userService.currentUser();
    Notebook notebook = new Notebook(bean.getIdentifier(), current);
    notebookService.createNotebook(notebook);
    model.put("notebooks", notebookService.findNotebooks());
    return "notebookList";
  }
예제 #2
0
 @SuppressWarnings("unchecked")
 @RequestMapping(method = RequestMethod.GET)
 public String handleGet(@ModelAttribute("nbid") NotebookIdBean bean, ModelMap model) {
   model.put("notebooks", notebookService.findNotebooks());
   return "notebookList";
 }