java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.apache.taglibs.application.EqualsAttributeTag
- All Implemented Interfaces:
- javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag
- public class EqualsAttributeTag
- extends javax.servlet.jsp.tagext.TagSupport
JSP Tag equalsAttribute, used to determine if a ServletContext
attribute equals the value of the "match" tag attribute.
Includes the body of the tag if the attribute equals the value of the
"match" tag attribute.
You can set the optional tag attribute value to true or
false. The body of the tag is included if equalsAttribute matches
the value.
You can set the optional tag attribute ignoreCase to true or
false. If ignoreCase is set to true, then the comparison between the
application attribute and the "match" tag attribute will not be
case-sensitive.
JSP Tag Lib Descriptor
<name>equalsAttribute</name>
<tagclass>org.apache.taglibs.application.EqualsAttributeTag</tagclass>
<bodycontent>JSP</bodycontent>
<info>Includes the body of the tag if the application attribute equals the
value of the "match" tag attribute.</info>
<attribute>
<name>name</name>
<required>true</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
<attribute>
<name>value</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
<attribute>
<name>match</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>ignoreCase</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
|
Method Summary |
int |
doStartTag()
Includes the body of the tag if the application attribute equals the value set in the
'match' attribute. |
void |
setIgnoreCase(boolean value)
If ignoreCase is set to true, then the comparison
between the "match" attribute and the
application attribute will not be case sensitive |
void |
setMatch(java.lang.String str)
Set the String that will be compared to the application
attribute. |
void |
setName(java.lang.String str)
Set the required tag attribute name. |
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 |
name
private java.lang.String name
match
private java.lang.String match
ignoreCase
private boolean ignoreCase
value
private boolean value
EqualsAttributeTag
public EqualsAttributeTag()
doStartTag
public final int doStartTag()
throws javax.servlet.jsp.JspException
- Includes the body of the tag if the application attribute equals the value set in the
'match' attribute.
setName
public final void setName(java.lang.String str)
- Set the required tag attribute name.
setMatch
public final void setMatch(java.lang.String str)
- Set the String that will be compared to the application
attribute.
setIgnoreCase
public final void setIgnoreCase(boolean value)
- If ignoreCase is set to true, then the comparison
between the "match" attribute and the
application attribute will not be case sensitive
setValue
public final void setValue(boolean value)
- Set the optional tag attribute value to true or false.