Package com.liferay.item.selector
Interface ItemSelectorView<T extends ItemSelectorCriterion>
- All Known Subinterfaces:
PortletItemSelectorView<T>
public interface ItemSelectorView<T extends ItemSelectorCriterion>
Provides an interface to render an item selector view for a particular item
selector criterion.
If one item selector view can be displayed for multiple different criteria, it needs as many implementations of this interface as criteria.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the item selector criterion associated to this item selector view.Returns the item selector return types that this view supports.Returns the localized title of the tab to display in the Item Selector dialog.default boolean
isVisible
(com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) Deprecated.As of Athanasius (7.3.x)default boolean
Returns whether the item selector view is visible.void
renderHTML
(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse, T itemSelectorCriterion, javax.portlet.PortletURL portletURL, String itemSelectedEventName, boolean search) Renders the HTML code for the item selector view.
-
Method Details
-
getItemSelectorCriterionClass
Returns the item selector criterion associated to this item selector view.- Returns:
- the item selector criterion associated to this item selector view
-
getSupportedItemSelectorReturnTypes
List<ItemSelectorReturnType> getSupportedItemSelectorReturnTypes()Returns the item selector return types that this view supports.- Returns:
- the
ItemSelectorReturnType
s that this view supports
-
getTitle
Returns the localized title of the tab to display in the Item Selector dialog.- Parameters:
locale
- the current locale- Returns:
- the localized title of the tab
-
isVisible
default boolean isVisible(T itemSelectorCriterion, com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) Returns whether the item selector view is visible.Most of the implementations of this method will return
true
. However, there are certain cases where the view should not be displayed: the view isn't ready, the view needs some additional third-party configuration, etc.- Parameters:
itemSelectorCriterion
- the item selector criterion that was used to render this viewthemeDisplay
- the current pageThemeDisplay
- Returns:
true
if the view is visible
-
isVisible
Deprecated.As of Athanasius (7.3.x)Returns whether the item selector view is visible.Most of the implementations of this method will return
true
. However, there are certain cases where the view should not be displayed: the view isn't ready, the view needs some additional third-party configuration, etc.- Parameters:
themeDisplay
- the current pageThemeDisplay
- Returns:
true
if the view is visible
-
renderHTML
void renderHTML(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse, T itemSelectorCriterion, javax.portlet.PortletURL portletURL, String itemSelectedEventName, boolean search) throws IOException, javax.servlet.ServletException Renders the HTML code for the item selector view.- Parameters:
servletRequest
- the currentServletRequest
servletResponse
- the currentServletResponse
itemSelectorCriterion
- the item selector criterion that was used to render this viewportletURL
- the portlet render URL to the item selector. This URL should be used to create URLs in the view.itemSelectedEventName
- the event name that the caller will be listening for. When an element is selected, the view should fire a JavaScript event with this name.search
- set totrue
when the view should render search results because the user performed a search.- Throws:
IOException
javax.servlet.ServletException
-