| ifnot | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Description | This tag tests the specified property and includes the tag body if the property evaluates to false. This is the opposite of the if tag. | |||||||||||||||
| Tag Body | JSP | |||||||||||||||
| Restrictions | If the nameattribute is not specified then uses a parentbeantag to locate the bean on which to operate. Thepropertyspecifies what to test. Thevalueattribute specifies the string value
to test the property; theidattribute specifies the bean object value
to test the property. If neithervalueoridis specified then
the test is true if the property value is non-null. | |||||||||||||||
| Attributes | This tag has the following attributes: 
 | |||||||||||||||
| Properties | None. | |||||||||||||||
| Example(s) | <%-- test if the date time != 0 on parent bean --%> <util:bean type="java.util.Date"> <util:ifnot property="time" value="0"> ... date.time != 0 </util:ifnot> </util:bean> <%-- test if the date time != 0 on named bean --%> <util:bean id="date" type="java.util.Date"/> ... <util:ifnot name="date" property="time" value="0"> ... date.time != 0 </util:ifnot> <%-- test if bean property is null --%> <util:bean type="Bean"> <util:ifnot property="name"> ... Bean.name == null </util:ifnot> </util:bean> <%-- test using two beans --%> <util:bean id="one" type="BeanOne"/> <util:bean id="two" type="BeanTwo"/> <util:ifnot name="one" property="bean" id="two"> ... one.bean != two </util:ifnot> | |||||||||||||||