Package com.jeecms.cms.web

Examples of com.jeecms.cms.web.WebErrors


  }

  @RequestMapping("/advertising/o_save.do")
  public String save(CmsAdvertising bean, Integer adspaceId,
      HttpServletRequest request, ModelMap model) {
    WebErrors errors = validateSave(bean, request);
    if (errors.hasErrors()) {
      return errors.showErrorPage(model);
    }
    Map<String, String> attr = RequestUtils.getRequestMap(request, "attr_");
    // 去除为空串的属性
    Set<String> toRemove = new HashSet<String>();
    for (Entry<String, String> entry : attr.entrySet()) {
View Full Code Here


  @RequestMapping("/advertising/o_update.do")
  public String update(Integer queryAdspaceId, Boolean queryEnabled,
      CmsAdvertising bean, Integer adspaceId, Integer pageNo,
      HttpServletRequest request, ModelMap model) {
    WebErrors errors = validateUpdate(bean.getId(), request);
    if (errors.hasErrors()) {
      return errors.showErrorPage(model);
    }
    Map<String, String> attr = RequestUtils.getRequestMap(request, "attr_");
    // 去除为空串的属性
    Set<String> toRemove = new HashSet<String>();
    for (Entry<String, String> entry : attr.entrySet()) {
View Full Code Here

  @RequestMapping("/advertising/o_delete.do")
  public String delete(Integer[] ids, Integer queryAdspaceId,
      Boolean queryEnabled, Integer pageNo, HttpServletRequest request,
      ModelMap model) {
    WebErrors errors = validateDelete(ids, request);
    if (errors.hasErrors()) {
      return errors.showErrorPage(model);
    }
    CmsAdvertising[] beans = manager.deleteByIds(ids);
    for (CmsAdvertising bean : beans) {
      log.info("delete CmsAdvertising id={}", bean.getId());
      cmsLogMng.operating(request, "cmsAdvertising.log.delete", "id="
View Full Code Here

  @RequestMapping("/advertising/o_upload_flash.do")
  public String uploadFlash(
      @RequestParam(value = "flashFile", required = false) MultipartFile file,
      String flashNum, HttpServletRequest request, ModelMap model) {
    WebErrors errors = validateUpload(file, request);
    if (errors.hasErrors()) {
      model.addAttribute("error", errors.getErrors().get(0));
      return "advertising/flash_iframe";
    }
    CmsSite site = CmsUtils.getSite(request);
    String origName = file.getOriginalFilename();
    String ext = FilenameUtils.getExtension(origName).toLowerCase(
View Full Code Here

    return "advertising/flash_iframe";
  }

  private WebErrors validateSave(CmsAdvertising bean,
      HttpServletRequest request) {
    WebErrors errors = WebErrors.create(request);
    CmsSite site = CmsUtils.getSite(request);
    bean.setSite(site);
    return errors;
  }
View Full Code Here

    bean.setSite(site);
    return errors;
  }

  private WebErrors validateEdit(Integer id, HttpServletRequest request) {
    WebErrors errors = WebErrors.create(request);
    CmsSite site = CmsUtils.getSite(request);
    if (vldExist(id, site.getId(), errors)) {
      return errors;
    }
    return errors;
View Full Code Here

    }
    return errors;
  }

  private WebErrors validateUpdate(Integer id, HttpServletRequest request) {
    WebErrors errors = WebErrors.create(request);
    CmsSite site = CmsUtils.getSite(request);
    if (vldExist(id, site.getId(), errors)) {
      return errors;
    }
    return errors;
View Full Code Here

    }
    return errors;
  }

  private WebErrors validateDelete(Integer[] ids, HttpServletRequest request) {
    WebErrors errors = WebErrors.create(request);
    CmsSite site = CmsUtils.getSite(request);
    if (errors.ifEmpty(ids, "ids")) {
      return errors;
    }
    for (Integer id : ids) {
      vldExist(id, site.getId(), errors);
    }
View Full Code Here

    return false;
  }

  private WebErrors validateUpload(MultipartFile file,
      HttpServletRequest request) {
    WebErrors errors = WebErrors.create(request);
    if (errors.ifNull(file, "file")) {
      return errors;
    }
    return errors;
  }
View Full Code Here

    return "acquisition/add";
  }

  @RequestMapping("/acquisition/v_edit.do")
  public String edit(Integer id, HttpServletRequest request, ModelMap model) {
    WebErrors errors = validateEdit(id, request);
    if (errors.hasErrors()) {
      return errors.showErrorPage(model);
    }
    CmsSite site = CmsUtils.getSite(request);
    // 内容类型
    List<ContentType> typeList = contentTypeMng.getList(false);
    // 栏目列表
View Full Code Here

TOP

Related Classes of com.jeecms.cms.web.WebErrors

Copyright © 2018 www.massapicom. 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.