Package org.deltava.taglib.content
Class SuperUserFilterTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.deltava.taglib.content.SuperUserFilterTag
- All Implemented Interfaces:
Serializable
,IterationTag
,JspTag
,Tag
A JSP tag to filter out content that is displayed for superusers only.
- Since:
- 1.0
- Version:
- 7.0
- Author:
- Luke
- See Also:
-
Field Summary
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
-
Constructor Summary
-
Method Summary
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
-
Constructor Details
-
SuperUserFilterTag
public SuperUserFilterTag()
-
-
Method Details
-
setVar
Sets the request attribute to save the impersonated user object into.- Parameters:
name
- the attribute name
-
release
public void release()Releases the tag's state variables.- Specified by:
release
in interfaceTag
- Overrides:
release
in classTagSupport
-
doStartTag
Renders the start of the JSP tag and applies the filter.- Specified by:
doStartTag
in interfaceTag
- Overrides:
doStartTag
in classTagSupport
- Returns:
- EVAL_BODY_INCLUDE if acting as a superUser, otherwise SKIP_BODY
- Throws:
JspException
- if an error occurs
-
doEndTag
Renders the JSP closing tag and releases state.- Specified by:
doEndTag
in interfaceTag
- Overrides:
doEndTag
in classTagSupport
- Returns:
- EVAL_PAGE always
- Throws:
JspException
- never
-