public static void addPortletBreadcrumbEntries( long assetCategoryId, HttpServletRequest request, PortletURL portletURL) throws Exception { AssetCategory assetCategory = AssetCategoryLocalServiceUtil.getCategory(assetCategoryId); List<AssetCategory> ancestorCategories = assetCategory.getAncestors(); Collections.reverse(ancestorCategories); for (AssetCategory ancestorCategory : ancestorCategories) { portletURL.setParameter("categoryId", String.valueOf(ancestorCategory.getCategoryId())); PortalUtil.addPortletBreadcrumbEntry( request, ancestorCategory.getTitleCurrentValue(), portletURL.toString()); } portletURL.setParameter("categoryId", String.valueOf(assetCategoryId)); PortalUtil.addPortletBreadcrumbEntry( request, assetCategory.getTitleCurrentValue(), portletURL.toString()); }
@Override public String getDisplayName(AssetCategory category) { return category.getTitleCurrentValue(); }