|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
org.apache.taglibs.i18n.ConditionalTagSupport
public abstract class ConditionalTagSupport
This class provides the base implementation for the ifdef and ifndef tags. Subclasses must provide an implementation of the shouldEvaluate() method.
Field Summary | |
---|---|
protected static java.lang.String |
_tagname
|
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
---|
bodyContent |
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
---|
id, pageContext |
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag |
---|
EVAL_BODY_BUFFERED, EVAL_BODY_TAG |
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 | |
---|---|
ConditionalTagSupport()
|
Method Summary | |
---|---|
int |
doEndTag()
Prints the body of the tag. |
int |
doStartTag()
locates the bundle and tests whether the key has a value |
java.util.ResourceBundle |
getBundle()
|
protected java.lang.String |
getValue()
returns (if any) the value specified for the key in the bundle. |
void |
release()
clears out the key for the next usage |
void |
setBundle(java.util.ResourceBundle aBundle)
sets the bundle to an actual ResourceBundle object if neither bundle or bundleRef are specified, uses the bundle most recently defined on the page by the i18n:bundle tag |
void |
setBundleRef(java.lang.String varName)
sets the bundle based on a variable defined in the page if neither bundle or bundleRef are specified, uses the first bundle defined on the page by the i18n:bundle tag |
void |
setKey(java.lang.String key)
sets the key to use when looking up the value in the bundle |
abstract boolean |
shouldEvaluate()
must be overridden by a subclass to return a boolean value |
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
---|
doAfterBody, doInitBody, getBodyContent, getPreviousOut, setBodyContent |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
---|
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 |
Methods inherited from interface javax.servlet.jsp.tagext.Tag |
---|
getParent, setPageContext, setParent |
Field Detail |
---|
protected static java.lang.String _tagname
Constructor Detail |
---|
public ConditionalTagSupport()
Method Detail |
---|
public void setKey(java.lang.String key)
public void setBundleRef(java.lang.String varName)
public void setBundle(java.util.ResourceBundle aBundle)
public java.util.ResourceBundle getBundle()
public void release()
release
in interface javax.servlet.jsp.tagext.Tag
release
in class javax.servlet.jsp.tagext.BodyTagSupport
public abstract boolean shouldEvaluate() throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
protected java.lang.String getValue() throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
public int doStartTag() throws javax.servlet.jsp.JspException
doStartTag
in interface javax.servlet.jsp.tagext.Tag
doStartTag
in class javax.servlet.jsp.tagext.BodyTagSupport
javax.servlet.jsp.JspException
public int doEndTag() throws javax.servlet.jsp.JspException
Always return the flag for processing the rest of the JSP page.
doEndTag
in interface javax.servlet.jsp.tagext.Tag
doEndTag
in class javax.servlet.jsp.tagext.BodyTagSupport
javax.servlet.jsp.JspException
- if the writing out of the body fails.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |