Example #1
0
  // @ExceptionHandler(Exception.class)
  @RequestMapping(value = "/blog/{commuId}/{lanuageId}/{moduleId}", method = RequestMethod.GET)
  public String getFullBlog(
      Map<String, Object> map,
      @PathVariable("commuId") int commuId,
      @PathVariable("lanuageId") int lanuageId,
      @PathVariable("moduleId") int moduleId,
      // @PathVariable("packageId") int packageId,
      @ModelAttribute(value = "userdetail") UserProfileForm userdetail,
      @ModelAttribute(value = "ACCESS_CONTROL") List<VModuleSubmenu> vModuleSubmenuList) {

    map.put("commuId", commuId);
    map.put("lanuageId", lanuageId);
    // map.put("smallBlogCommu", loadPageService.loadCommunityDeatils(commuId, 1));
    map.put("moduleId", moduleId);
    boolean fullDetail = true;
    // userdetail.get
    if (vModuleSubmenuList != null) {
      for (VModuleSubmenu vModuleSubmenu : vModuleSubmenuList) {
        if (moduleId == 100 || moduleId == 101 || moduleId == 102) {
          loadBlog(map, moduleId, commuId, lanuageId, fullDetail, userdetail);
          break;
        } else if (moduleId == vModuleSubmenu.getModuleId()) {
          loadBlog(map, moduleId, commuId, lanuageId, fullDetail, userdetail);
          break;
        }
      }

      map.put("commuId", commuId);
      map.put("lanuageId", lanuageId);
      map.put("moduleId", moduleId);
      return (String) map.get(HaakConst.KEY_RETURN_PAGE);

    } else {
      return "welcome.htm";
    }
  }
Example #2
0
  @RequestMapping(value = "/home2/{commuId}/{lanuageId}/{menuId}", method = RequestMethod.GET)
  public String home2(
      Map<String, Object> map,
      @PathVariable("commuId") int commuId,
      @PathVariable("lanuageId") int lanuageId,
      @PathVariable("menuId") int MenuID,
      @ModelAttribute(value = "userdetail") UserProfileForm userdetail) {

    // init page
    // VCommunity commuDetails= loadPageService.loadCommunityDeatils(commuId, 1);
    boolean flagLogin = false;
    boolean flagFullDetails = false;
    List<VModuleSubmenu> vModuleSubmenuList = new ArrayList<VModuleSubmenu>();
    // int commuid get from request
    if (userdetail != null && userdetail.getUserName() != null) {
      flagLogin = true;
    }
    // --end init page

    // login Process
    if (flagLogin) {
      map.put(
          "NEW_SUB_MENU",
          getStringSubMenu(
              loadPageService.loadMenuSubmenu(lanuageId, commuId, userdetail.getRoleList()),
              commuId,
              lanuageId,
              MenuID));
      vModuleSubmenuList = loadPageService.getUserPrivilege(commuId, userdetail.getRoleList());
      //    		map.put("MENU_LIST", loadPageService.loadMenuSubmenu( lanuageId ,commuId
      // ,userdetail.getRoleList()),commuId,lanuageId,MenuID);
    } else {
      vModuleSubmenuList = loadPageService.getUserPrivilege(commuId, new int[] {0});
      map.put(
          "NEW_SUB_MENU",
          getStringSubMenu(
              loadPageService.loadMenuSubmenu(lanuageId, commuId, new int[] {6}),
              commuId,
              lanuageId,
              MenuID));
      map.put("MENU_LIST", loadPageService.loadMenuSubmenu(lanuageId, commuId, new int[] {6}));
    }
    map.put("ACCESS_CONTROL", vModuleSubmenuList);
    map.put("menuform", new MenuForm());
    map.put("adobj", new BlogAd());
    map.put("commuID", commuId);
    map.put("lanuageId", lanuageId);

    for (VModuleSubmenu vModuleSubmenu : vModuleSubmenuList) {
      int moduleId = vModuleSubmenu.getModuleId();
      if (moduleId == 9 && flagLogin != true) {
        // loadBlog(map,9 , commuId, lanuageId,packageID , false,userdetail);
      } else {
        // loadBlog(map, moduleId, commuId, lanuageId,packageID , flagFullDetails,userdetail);
        loadBlog(map, moduleId, commuId, lanuageId, flagFullDetails, userdetail);
      }
    }

    if (flagLogin) {
      // loadBlog(map, 100, commuId, lanuageId,packageID , flagFullDetails,userdetail);
      loadBlog(map, 100, commuId, lanuageId, flagFullDetails, userdetail);
    }
    return "welcome2.htm";
  }