org.apache.taglibs.dbtags.resultset
Class WasEmptyTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.apache.taglibs.dbtags.resultset.WasEmptyTag
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.Tag
- Direct Known Subclasses:
- WasNotEmptyTag
public class WasEmptyTag
- extends javax.servlet.jsp.tagext.TagSupport
Executes its body if the last ResultSet tag received 0 rows
from the database. You must be after a ResultSet tag and inside
a StatementTag or PreparedStatementTag, or an error will be generated.
The subclass WasNotEmpty sets the "value" property to false,
and therefore executes its tag body is the ResultSet contained
greater than 0 rows.
JSP Tag Lib Descriptor
<name>wasEmpty</name>
<tagclass>org.apache.taglibs.dbtags.statement.WasEmptyTag</tagclass>
<bodycontent>JSP</bodycontent>
<info>
Executes its body if the last ResultSet tag received 0 rows
from the database. You must be after a ResultSet tag and inside
a StatementTag or PreparedStatementTag, or an error will be generated.
</info>
- Author:
- Morgan Delagrange
- See Also:
WasNotEmptyTag
,
Serialized Form
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 |
Method Summary |
int |
doStartTag()
|
void |
release()
|
void |
setValue(boolean value)
Sets the necessary boolean value in order to
execute the tag body. |
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 |
WasEmptyTag
public WasEmptyTag()
setValue
public void setValue(boolean value)
- Sets the necessary boolean value in order to
execute the tag body.
- Parameters:
value
-
doStartTag
public int doStartTag()
throws javax.servlet.jsp.JspTagException
- Specified by:
doStartTag
in interface javax.servlet.jsp.tagext.Tag
- Overrides:
doStartTag
in class javax.servlet.jsp.tagext.TagSupport
- Throws:
javax.servlet.jsp.JspTagException
release
public void release()
- Specified by:
release
in interface javax.servlet.jsp.tagext.Tag
- Overrides:
release
in class javax.servlet.jsp.tagext.TagSupport
Copyright ? 2000-2004 The Apache Software Foundation. All Rights Reserved.