public interface ItemSelectorView<T extends ItemSelectorCriterion>
If one item selector view can be displayed for multiple different criteria, it needs as many implementations of this interface as criteria.
| Modifier and Type | Method and Description |
|---|---|
java.lang.Class<? extends T> |
getItemSelectorCriterionClass()
Returns the item selector criterion associated to this item selector
view.
|
java.util.List<ItemSelectorReturnType> |
getSupportedItemSelectorReturnTypes()
Returns the item selector return types that this view supports.
|
java.lang.String |
getTitle(java.util.Locale locale)
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 |
isVisible(T itemSelectorCriterion,
com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay)
Returns whether the item selector view is visible.
|
void |
renderHTML(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse,
T itemSelectorCriterion,
javax.portlet.PortletURL portletURL,
java.lang.String itemSelectedEventName,
boolean search)
Renders the HTML code for the item selector view.
|
java.lang.Class<? extends T> getItemSelectorCriterionClass()
java.util.List<ItemSelectorReturnType> getSupportedItemSelectorReturnTypes()
ItemSelectorReturnTypes that this view supportsjava.lang.String getTitle(java.util.Locale locale)
locale - the current localedefault boolean isVisible(T itemSelectorCriterion, com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay)
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.
itemSelectorCriterion - the item selector criterion that was used
to render this viewthemeDisplay - the current page ThemeDisplaytrue if the view is visible@Deprecated default boolean isVisible(com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay)
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.
themeDisplay - the current page ThemeDisplaytrue if the view is visiblevoid renderHTML(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse,
T itemSelectorCriterion,
javax.portlet.PortletURL portletURL,
java.lang.String itemSelectedEventName,
boolean search)
throws java.io.IOException,
javax.servlet.ServletException
servletRequest - the current ServletRequestservletResponse - the current ServletResponseitemSelectorCriterion - 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 to true when the view should render search
results because the user performed a search.java.io.IOExceptionjavax.servlet.ServletException