Esempio n. 1
0
  public static void addPortletBreadcrumbEntries(
      long categoryId, HttpServletRequest request, RenderResponse renderResponse) throws Exception {

    if ((categoryId == MBCategoryConstants.DEFAULT_PARENT_CATEGORY_ID)
        || (categoryId == MBCategoryConstants.DISCUSSION_CATEGORY_ID)) {

      return;
    }

    MBCategory category = MBCategoryLocalServiceUtil.getCategory(categoryId);

    addPortletBreadcrumbEntries(category, request, renderResponse);
  }
Esempio n. 2
0
  public static void addPortletBreadcrumbEntries(
      MBMessage message, HttpServletRequest request, RenderResponse renderResponse)
      throws Exception {

    if (message.getCategoryId() == MBCategoryConstants.DISCUSSION_CATEGORY_ID) {

      return;
    }

    if (message.getCategoryId() != MBCategoryConstants.DEFAULT_PARENT_CATEGORY_ID) {

      addPortletBreadcrumbEntries(message.getCategory(), request, renderResponse);
    }

    PortletURL portletURL = renderResponse.createRenderURL();

    portletURL.setParameter("struts_action", "/message_boards/view_message");
    portletURL.setParameter("messageId", String.valueOf(message.getMessageId()));

    PortalUtil.addPortletBreadcrumbEntry(request, message.getSubject(), portletURL.toString());
  }