Package com.liferay.application.list
Class BaseJSPPanelCategory
java.lang.Object
com.liferay.application.list.BasePanelCategory
com.liferay.application.list.BaseJSPPanelCategory
- All Implemented Interfaces:
PanelCategory
,PanelEntry
Provides a skeletal implementation of the
PanelCategory
with JSP
support to minimize the effort required to implement this interface.
To implement a JSP application category, this class should be extended and
getJspPath()
should be implemented, which returns a path for the
main JSP application category view in the current servlet context. getServletContext()
should be implemented, which returns the appropriate
servlet context for JSP pages. If the servlet context is not set, include(HttpServletRequest, HttpServletResponse)
will throw a
NullPointerException
.
JSP application categories include JSP applications defined by BaseJSPPanelApp
implementations.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract String
protected abstract javax.servlet.ServletContext
boolean
include
(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) Returnstrue
if the category body renders successfully.boolean
includeHeader
(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) Returnstrue
if the category header renders successfully.protected boolean
includeJSP
(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, String jspPath) Methods inherited from class com.liferay.application.list.BasePanelCategory
equals, getNotificationsCount, hashCode, isActive, isPersistState, isShow
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.liferay.application.list.PanelCategory
isAllowScopeLayouts
Methods inherited from interface com.liferay.application.list.PanelEntry
getKey, getLabel
-
Constructor Details
-
BaseJSPPanelCategory
public BaseJSPPanelCategory()
-
-
Method Details
-
getHeaderJspPath
-
getJspPath
-
include
public boolean include(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws IOException Description copied from interface:PanelCategory
Returnstrue
if the category body renders successfully.- Specified by:
include
in interfacePanelCategory
- Overrides:
include
in classBasePanelCategory
- Parameters:
httpServletRequest
- the servlet request used in the rendering processhttpServletResponse
- the servlet response used in the rendering process- Returns:
true
if the category body renders successfully;false
otherwise- Throws:
IOException
- if an IO exception occurred
-
includeHeader
public boolean includeHeader(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws IOException Description copied from interface:PanelCategory
Returnstrue
if the category header renders successfully.- Specified by:
includeHeader
in interfacePanelCategory
- Overrides:
includeHeader
in classBasePanelCategory
- Parameters:
httpServletRequest
- the servlet request used in the rendering processhttpServletResponse
- the servlet response used in the rendering process- Returns:
true
if the category header renders successfully;false
otherwise- Throws:
IOException
- if an IO exception occurred
-
getServletContext
protected abstract javax.servlet.ServletContext getServletContext() -
includeJSP
protected boolean includeJSP(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, String jspPath) throws IOException - Throws:
IOException
-