public abstract class BaseJSPPanelCategory extends BasePanelCategory
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.
BasePanelCategory
,
PanelCategory
Constructor and Description |
---|
BaseJSPPanelCategory() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getHeaderJspPath() |
abstract java.lang.String |
getJspPath() |
protected abstract javax.servlet.ServletContext |
getServletContext() |
boolean |
include(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
Returns
true if the category body renders successfully. |
boolean |
includeHeader(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
Returns
true if the category header renders successfully. |
protected boolean |
includeJSP(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse,
java.lang.String jspPath) |
equals, getNotificationsCount, hashCode, isActive, isPersistState, isShow
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
isAllowScopeLayouts
getKey, getLabel
public java.lang.String getHeaderJspPath()
public abstract java.lang.String getJspPath()
public boolean include(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws java.io.IOException
PanelCategory
true
if the category body renders successfully.include
in interface PanelCategory
include
in class BasePanelCategory
httpServletRequest
- the servlet request used in the rendering
processhttpServletResponse
- the servlet response used in the rendering
processtrue
if the category body renders successfully;
false
otherwisejava.io.IOException
- if an IO exception occurredpublic boolean includeHeader(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws java.io.IOException
PanelCategory
true
if the category header renders successfully.includeHeader
in interface PanelCategory
includeHeader
in class BasePanelCategory
httpServletRequest
- the servlet request used in the rendering
processhttpServletResponse
- the servlet response used in the rendering
processtrue
if the category header renders successfully;
false
otherwisejava.io.IOException
- if an IO exception occurredprotected abstract javax.servlet.ServletContext getServletContext()
protected boolean includeJSP(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, java.lang.String jspPath) throws java.io.IOException
java.io.IOException