|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.jsp.tagext.TagSupport org.appfuse.webapp.taglib.ConstantsTag
public class ConstantsTag
This class is designed to put all the public variables in a class to a specified scope - designed for exposing a Constants class to Tag Libraries.
It is designed to be used as follows:
<tag:constants />
Optional values are "className" (fully qualified) and "scope".
Field Summary | |
---|---|
String |
clazz
The class to expose the variables from. |
protected String |
scope
The scope to be put the variable in. |
protected String |
var
The single variable to expose. |
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 | |
---|---|
ConstantsTag()
|
Method Summary | |
---|---|
int |
doStartTag()
|
String |
getClassName()
|
String |
getScope()
|
int |
getScope(String scopeName)
Converts the scope name into its corresponding PageContext constant value. |
String |
getVar()
|
void |
release()
Release all allocated resources. |
void |
setClassName(String clazz)
|
void |
setScope(String scope)
|
void |
setVar(String var)
|
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
---|
doAfterBody, doEndTag, 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 |
Field Detail |
---|
public String clazz
protected String scope
protected String var
Constructor Detail |
---|
public ConstantsTag()
Method Detail |
---|
public int doStartTag() throws JspException
doStartTag
in interface Tag
doStartTag
in class TagSupport
JspException
public void setClassName(String clazz)
public String getClassName()
public void setScope(String scope)
public String getScope()
public void setVar(String var)
public String getVar()
public void release()
release
in interface Tag
release
in class TagSupport
public int getScope(String scopeName) throws JspException
scopeName
- Can be "page", "request", "session", or "application" in any
case.
JspException
- if the scopeName is not a valid name.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |