Example usage for com.liferay.portal.kernel.theme ThemeDisplay getRefererGroupId

List of usage examples for com.liferay.portal.kernel.theme ThemeDisplay getRefererGroupId

Introduction

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

Prototype

public long getRefererGroupId() 

Source Link

Usage

From source file:com.liferay.item.selector.web.internal.ItemSelectorImpl.java

License:Open Source License

protected PortletURL getPortletURL(RequestBackedPortletURLFactory requestBackedPortletURLFactory, String title,
        String selectedTab, String itemSelectedEventName, ItemSelectorCriterion[] itemSelectorCriteriaArray,
        ThemeDisplay themeDisplay) {

    PortletURL portletURL = null;/*  w w  w  . j  ava  2 s. co  m*/

    if (Validator.isNotNull(selectedTab) && selectedTab.equals(title)) {
        portletURL = getItemSelectorURL(requestBackedPortletURLFactory, themeDisplay.getScopeGroup(),
                themeDisplay.getRefererGroupId(), itemSelectedEventName, itemSelectorCriteriaArray);
    } else {
        Group group = themeDisplay.getRefererGroup();

        if (group == null) {
            group = themeDisplay.getScopeGroup();
        }

        portletURL = getItemSelectorURL(requestBackedPortletURLFactory, group, 0, itemSelectedEventName,
                itemSelectorCriteriaArray);
    }

    portletURL.setParameter(PARAMETER_SELECTED_TAB, title);

    return portletURL;
}