Example usage for com.liferay.portal.kernel.theme PortletDisplay isFocused

List of usage examples for com.liferay.portal.kernel.theme PortletDisplay isFocused

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.theme PortletDisplay isFocused.

Prototype

public boolean isFocused() 

Source Link

Usage

From source file:com.liferay.asset.taglib.internal.util.AssetCategoryUtil.java

License:Open Source License

public static void addPortletBreadcrumbEntries(long assetCategoryId, HttpServletRequest request,
        PortletURL portletURL) throws Exception {

    ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);

    PortletDisplay portletDisplay = themeDisplay.getPortletDisplay();

    boolean portletBreadcrumbEntry = false;

    if (Validator.isNotNull(portletDisplay.getId()) && !portletDisplay.isFocused()) {

        portletBreadcrumbEntry = true;// w w  w.j  a  v a2  s . c o  m
    }

    addPortletBreadcrumbEntries(assetCategoryId, request, portletURL, portletBreadcrumbEntry);
}