Пример #1
0
 public ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object command, BindException errors)
         throws ServletException, WiseMappingException, ImporterException
 {
     final TagBean bean = (TagBean) command;
     final MindMap mindmap = getMindmapService().getMindmapById(bean.getMindmapId());
     getMindmapService().addTags(mindmap, bean.getMindmapTags());
     return new ModelAndView(getSuccessView());
 }
Пример #2
0
    //~ Methods ..............................................................................................
    protected Object formBackingObject(HttpServletRequest httpServletRequest) throws Exception {

        final MindMap mindmap = getMindmapFromRequest(httpServletRequest);
        final User user = Utils.getUser(httpServletRequest);
        final User dbUser = getUserService().getUserBy(user.getId());

        final TagBean tagBean = new TagBean();
        tagBean.setUserTags(dbUser.getTags());
        tagBean.setMindmapId(mindmap.getId());
        tagBean.setMindmapTags(mindmap.getTags());
        tagBean.setMindmapTitle(mindmap.getTitle());
        return tagBean;
    }