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. The
servlet context should also be set using setServletContext(ServletContext)
, which uses 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() |
boolean |
include(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Returns
true if the category body renders successfully. |
boolean |
includeHeader(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Returns
true if the category header renders successfully. |
protected boolean |
includeJSP(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String jspPath) |
void |
setServletContext(javax.servlet.ServletContext servletContext) |
equals, getNotificationsCount, hashCode, isActive, isPersistState, isShow
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getKey, getLabel
public java.lang.String getHeaderJspPath()
public abstract java.lang.String getJspPath()
public boolean include(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
PanelCategory
true
if the category body renders successfully.include
in interface PanelCategory
include
in class BasePanelCategory
request
- the servlet request used in the rendering processresponse
- 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 request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
PanelCategory
true
if the category header renders successfully.includeHeader
in interface PanelCategory
includeHeader
in class BasePanelCategory
request
- the servlet request used in the rendering processresponse
- the servlet response used in the rendering processtrue
if the category header renders successfully;
false
otherwisejava.io.IOException
- if an IO exception occurredpublic void setServletContext(javax.servlet.ServletContext servletContext)
protected boolean includeJSP(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String jspPath) throws java.io.IOException
java.io.IOException