Examples of CmsGuestbook


Examples of com.jeecms.cms.entity.assist.CmsGuestbook

  @RequestMapping(value = "/guestbook/{id}.jspx", method = RequestMethod.GET)
  public String detail(@PathVariable Integer id, HttpServletRequest request,
      HttpServletResponse response, ModelMap model) {
    CmsSite site = CmsUtils.getSite(request);
    CmsGuestbook guestbook = null;
    if (id != null) {
      guestbook = cmsGuestbookMng.findById(id);
    }
    model.addAttribute("guestbook", guestbook);
    FrontUtils.frontData(request, model, site);
View Full Code Here

Examples of com.jeecms.cms.entity.assist.CmsGuestbook

      return FrontUtils.showMessage(request, model, "member.memberClose");
    }
    if (user == null) {
      return FrontUtils.showLogin(request, model, site);
    }
    CmsGuestbook guestbook = guestbookMng.findById(id);
    model.addAttribute("guestbook", guestbook);
    return FrontUtils.getTplPath(request, site.getSolutionPath(),
        TPLDIR_GUESTBOOK, GUESTBOOK_DETAIL);
  }
View Full Code Here

Examples of com.jeecms.cms.entity.assist.CmsGuestbook

      return FrontUtils.showMessage(request, model, "member.memberClose");
    }
    if (user == null) {
      return FrontUtils.showLogin(request, model, site);
    }
    CmsGuestbook guestbook = guestbookMng.findById(id);
    if(!guestbook.getMember().equals(user)){
      WebErrors errors=WebErrors.create(request);
      errors.addErrorCode("error.noPermissionsView");
      return FrontUtils.showError(request, response, model, errors);
    }
    model.addAttribute("guestbook", guestbook);
View Full Code Here

Examples of com.jeecms.cms.entity.assist.CmsGuestbook

        first, max);
  }

  @Transactional(readOnly = true)
  public CmsGuestbook findById(Integer id) {
    CmsGuestbook entity = dao.findById(id);
    return entity;
  }
View Full Code Here

Examples of com.jeecms.cms.entity.assist.CmsGuestbook

  }

  public CmsGuestbook save(CmsUser member, Integer siteId, Integer ctgId,
      String ip, String title, String content, String email,
      String phone, String qq) {
    CmsGuestbook guestbook = new CmsGuestbook();
    guestbook.setMember(member);
    guestbook.setSite(cmsSiteMng.findById(siteId));
    guestbook.setIp(ip);
    CmsGuestbookExt ext = new CmsGuestbookExt();
    ext.setTitle(title);
    ext.setContent(content);
    ext.setEmail(email);
    ext.setPhone(phone);
View Full Code Here

Examples of com.jeecms.cms.entity.assist.CmsGuestbook

    cmsGuestbookExtMng.update(ext);
    return bean;
  }

  public CmsGuestbook deleteById(Integer id) {
    CmsGuestbook bean = dao.deleteById(id);
    return bean;
  }
View Full Code Here

Examples of com.jeecms.cms.entity.assist.CmsGuestbook

    CmsSite site = CmsUtils.getSite(request);
    WebErrors errors = validateEdit(id, request);
    if (errors.hasErrors()) {
      return errors.showErrorPage(model);
    }
    CmsGuestbook cmsGuestbook = manager.findById(id);
    List<CmsGuestbookCtg> ctgList = cmsGuestbookCtgMng
        .getList(site.getId());

    model.addAttribute("cmsGuestbook", cmsGuestbook);
    model.addAttribute("ctgList", ctgList);
View Full Code Here

Examples of com.jeecms.cms.entity.assist.CmsGuestbook

  private boolean vldExist(Integer id, Integer siteId, WebErrors errors) {
    if (errors.ifNull(id, "id")) {
      return true;
    }
    CmsGuestbook entity = manager.findById(id);
    if (errors.ifNotExist(entity, CmsGuestbook.class, id)) {
      return true;
    }
    if (!entity.getSite().getId().equals(siteId)) {
      errors.notInSite(CmsGuestbook.class, id);
      return true;
    }
    return false;
  }
View Full Code Here

Examples of com.jeecms.cms.entity.assist.CmsGuestbook

    f.setCacheable(cacheable);
    return f;
  }

  public CmsGuestbook findById(Integer id) {
    CmsGuestbook entity = get(id);
    return entity;
  }
View Full Code Here

Examples of com.jeecms.cms.entity.assist.CmsGuestbook

    getSession().save(bean);
    return bean;
  }

  public CmsGuestbook deleteById(Integer id) {
    CmsGuestbook entity = super.get(id);
    if (entity != null) {
      getSession().delete(entity);
    }
    return entity;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.