|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.servlet.jsp.tagext.TagSupport
org.deltava.taglib.content.RoleAttributeTag
public class RoleAttributeTag
A JSP Tag to set an attribute based on role membership.
| 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 | |
|---|---|
RoleAttributeTag()
|
|
| Method Summary | |
|---|---|
int |
doEndTag()
Closes the JSP and releases state. |
int |
doStartTag()
Checks for the roles listed and adds the attribute to the request if found. |
void |
release()
Clears state by reseting the role list. |
void |
setAttr(String attrName)
Sets the request attribute name. |
void |
setRoles(String roles)
Sets the role(s) a user must belong to in order to view the body of this tag. |
void |
setValue(Object attrValue)
Sets the request attribute value. |
| Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
|---|
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RoleAttributeTag()
| Method Detail |
|---|
public void setAttr(String attrName)
attrName - the attribute namepublic void setValue(Object attrValue)
attrValue - the attribute valuepublic void setRoles(String roles)
roles - a comma-delimited list of authorized role namespublic void release()
release in interface Tagrelease in class TagSupportpublic int doStartTag()
doStartTag in interface TagdoStartTag in class TagSupportpublic int doEndTag()
doEndTag in interface TagdoEndTag in class TagSupport
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||