org.apache.taglibs.regexp
Class ExistsMatchTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.apache.taglibs.regexp.ExistsMatchTag
- All Implemented Interfaces:
- javax.servlet.jsp.tagext.IterationTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag
- public class ExistsMatchTag
- extends javax.servlet.jsp.tagext.TagSupport
JSP Tag existsmatch, used to determine if a regular
expression match can be found in the text.
Includes the body of the tag if the a match was found.
The attribute regexp must be set to the id of a regexp
tag and the text attribute must be set to the id of a
text tag.
You can set the optional tag attribute value to true or
false. The body of the tag is included if existsmatch matches
the value.
JSP Tag Lib Descriptor
<name>existsmatch</name>
<tagclass>org.apache.taglibs.regexp.ExistsMatchTag</tagclass>
<bodycontent>JSP</bodycontent>
<info>Includes the body of the tag if the regexp attribute exists.</info>
<attribute>
<name>regexp</name>
<required>true</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
<attribute>
<name>text</name>
<required>true</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
<attribute>
<name>value</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
- Author:
- Glenn Nielsen
- See Also:
RegexpTag
,
TextTag
,
RegexpData
,
TextData
,
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()
Includes the body of the tag if the regexp finds a match in text. |
void |
setRegexp(java.lang.String str)
|
void |
setText(java.lang.String str)
|
void |
setValue(boolean value)
Set the optional tag attribute value to true or false. |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExistsMatchTag
public ExistsMatchTag()
doStartTag
public final int doStartTag()
throws javax.servlet.jsp.JspException
- Includes the body of the tag if the regexp finds a match in text.
- Returns:
- SKIP_BODY if existsmatch doesn't match value, EVAL_BODY_include if existsmatch matches value
- Throws:
javax.servlet.jsp.JspException
setRegexp
public final void setRegexp(java.lang.String str)
setText
public final void setText(java.lang.String str)
setValue
public final void setValue(boolean value)
- Set the optional tag attribute value to true or false.
Copyright ? 2000-2004 The Apache Software Foundation. All Rights Reserved.