Java Reference
In-Depth Information
8.2.3
Unary tags
Unary tags examine the state of a bean property and do not perform comparisons
against any other values. The body content is included if the result of the state is
true. All unary tags share the property attribute. The property attribute is used to
specify the property on the parameter object that will be used to examine the
state. The name of the tag indicates the type of state that is being examined. The
unary tag attributes are shown in table 8.4.
Table 8.4
Unary tag attributes
The property of the parameter used for state comparison.
property
(required)
This value is used to prepend to the tag's resulting body content. The prepend
value will not be prepended (a) when the tag's resulting body content is empty; (b) if
the tag is the first to produce body content and is nested in a tag with the remove-
FirstPrepend attribute set to true; or (c) if the tag is the first to produce body con-
tent following a <dynamic> tag with a prepend attribute value that is not empty.
prepend
(optional)
open
(optional)
This value is used to prefix to the tag's resulting body content. The open value will
not be prefixed if the tag's resulting body content is empty. The open value is pre-
fixed before the prepend attribute's value is prefixed. For example, if prepend="OR
" and open="(" , then the resulting combined prefix would be "OR (" .
close
(optional)
This value is used to append to the tag's resulting body content. The append value
will not be appended if the tag's resulting body content is empty.
This attribute value defines whether the first nested content-producing tag will have
its prepend value removed.
removeFirst-
Prepend
(optional)
All of the attributes in table 8.4 are available in the unary dynamic SQL tags listed
in table 8.5.
Table 8.5
Unary tags
<isProperty-
Available>
Determines whether the specified property exists in the parameter. With a
bean, it looks for a property. With a map, it looks for a key.
Checks whether the specified property does not exist in the parameter. With
a bean, it looks for a property. With a map, it looks for a key.
<isNotProperty-
Available>
<isNull>
Determines whether the specified property is null. With a bean, it looks at
the value of the property getter. With a map, it looks for a key. If the key
does not exist, it will return true.
<isNotNull>
Determines whether the specified property is anything other than null. With
a bean, it looks at the value of the property getter. With a map, it looks for a
key. If the key does not exist, it will return false.
Search WWH ::




Custom Search