示例#1
0
 @RequestMapping(value = "/search*.jspx", method = RequestMethod.GET)
 public String index(HttpServletRequest request, HttpServletResponse response, ModelMap model) {
   CmsSite site = CmsUtils.getSite(request);
   // 将request中所有参数保存至model中。
   model.putAll(RequestUtils.getQueryParams(request));
   FrontUtils.frontData(request, model, site);
   FrontUtils.frontPageData(request, model);
   String q = RequestUtils.getQueryParam(request, "q");
   if (q.equals("?") || q.equals("*")) {
     return FrontUtils.getTplPath(request, site.getSolutionPath(), TPLDIR_SPECIAL, SEARCH_ERROR);
   }
   if (q.startsWith("?") || q.startsWith("*")) {
     model.addAttribute("oldq", q);
     q = q.substring(1);
     // 替换关键词
     model.addAttribute("q", q);
   }
   String channelId = RequestUtils.getQueryParam(request, "channelId");
   if (StringUtils.isBlank(q) && StringUtils.isBlank(channelId)) {
     model.remove("q");
     model.remove("channelId");
     return FrontUtils.getTplPath(request, site.getSolutionPath(), TPLDIR_SPECIAL, SEARCH_INPUT);
   } else {
     return FrontUtils.getTplPath(request, site.getSolutionPath(), TPLDIR_SPECIAL, SEARCH_RESULT);
   }
 }
示例#2
0
 /**
  * 客户端包含
  *
  * @param request
  * @param model
  * @return
  */
 @RequestMapping(value = "/login_csi.jspx")
 public String csi(HttpServletRequest request, ModelMap model) {
   CmsSite site = CmsUtils.getSite(request);
   // 将request中所有参数
   model.putAll(RequestUtils.getQueryParams(request));
   FrontUtils.frontData(request, model, site);
   return FrontUtils.getTplPath(request, site.getSolutionPath(), TPLDIR_CSI, LOGIN_CSI);
 }
示例#3
0
 /**
  * 解析至自定义模板页
  *
  * @param tpl 自定义模板名称
  * @param request
  * @param response
  * @param model
  * @return
  */
 @RequestMapping(value = "/csi_custom.jspx")
 public String custom(
     String tpl, HttpServletRequest request, HttpServletResponse response, ModelMap model) {
   log.debug("visit csi custom template: {}", tpl);
   CmsSite site = CmsUtils.getSite(request);
   // 将request中所有参数保存至model中。
   model.putAll(RequestUtils.getQueryParams(request));
   FrontUtils.frontData(request, model, site);
   return FrontUtils.getTplPath(site.getSolutionPath(), TPLDIR_CSI_CUSTOM, tpl);
 }
示例#4
0
 @RequestMapping("/topa")
 public String topa(ModelMap map, String popedomId, String level) {
   map.putAll(this.modelmap);
   map.putAll(this.modelmap);
   @SuppressWarnings("unchecked")
   List<Popedem> popedemList = (List<Popedem>) this.modelmap.get("splist3");
   // 如果级别是2,说明点击的二级权限查询三级权限
   if (level.equals("2") && popedemList != null && popedemList.size() > 0) {
     List<Popedem> sp1 = new ArrayList<Popedem>();
     for (int i = 0; i < popedemList.size(); i++) {
       if (popedemList.get(i).getParentid().equals(popedomId)) {
         sp1.add(popedemList.get(i));
       }
     }
     map.put("splist3", sp1);
   }
   return "WebRoot/mainNavigation";
 }
 /** 管理 */
 @RequestMapping(
     value = "manage",
     method = {RequestMethod.GET, RequestMethod.POST})
 public String manage(
     HttpServletRequest request,
     ModelMap model,
     Query query,
     Paging paging,
     MetaColumn metaColumn) {
   //		query.addParameter("id",metaColumn.getId());
   //		query.addParameter("tableId",metaColumn.getTableId());
   //		query.addParameter("tableName",metaColumn.getTableName());
   //		query.addParameter("name",metaColumn.getName());
   //		query.addParameter("type",metaColumn.getType());
   //		query.addParameter("isKey",metaColumn.getIsKey());
   Map<String, Object> params = XParamsUtils.parse(request.getParameterMap());
   query.setParameters(params);
   query.setPaging(paging);
   List<MetaColumn> metaColumns = metaColumnService.list(query);
   model.put("metaColumns", metaColumns);
   model.put("query", query);
   model.putAll(XParamsUtils.op(params));
   return "meta/column/manage";
 }
示例#6
0
 @RequestMapping("/mainNavigation")
 public String mainNavigation(ModelMap map) {
   map.putAll(this.modelmap);
   return "WebRoot/mainNavigation";
 }
示例#7
0
 @RequestMapping("/mainTop")
 public String mainTop(ModelMap map) {
   map.putAll(this.modelmap);
   return "WebRoot/mainTop";
 }
示例#8
0
 @RequestMapping("/left")
 public String left(ModelMap map) {
   System.out.println(this.modelmap.get("splist2"));
   map.putAll(this.modelmap);
   return "WebRoot/left";
 }