📄 struts-logic.tld
字号:
]]>
</description>
</attribute>
<attribute>
<name>parameter</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description>
<![CDATA[
<p>The variable to be compared is the first, or only, value of the
request parameter specified by this attribute.</p>
]]>
</description>
</attribute>
<attribute>
<name>property</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description>
<![CDATA[
<p>The variable to be compared is the property (of the bean specified
by the <code>name</code> attribute) specified by this attribute.
The property reference can be simple, nested, and/or indexed.</p>
]]>
</description>
</attribute>
<attribute>
<name>scope</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description>
<![CDATA[
<p>The bean scope within which to search for the bean named by the
<code>name</code> property, or "any scope" if not specified.</p>
]]>
</description>
</attribute>
<attribute>
<name>value</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
<description>
<![CDATA[
<p>The constant value to which the variable, specified by other
attribute(s) of this tag, will be compared.</p>
]]>
</description>
</attribute>
</tag>
<tag>
<name>greaterThan</name>
<tag-class>org.apache.struts.taglib.logic.GreaterThanTag</tag-class>
<body-content>JSP</body-content>
<description>
<![CDATA[
<p><strong>
Evaluate the nested body content of this tag if the requested
variable is greater than the specified value.
</strong></p>
<p>Compares the variable specified by one of the selector attributes
against the specified constant value. The nested body content of this
tag is evaluated if the variable is <strong>greater than</strong>
the value.</p>
]]>
</description>
<attribute>
<name>cookie</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description>
<![CDATA[
<p>The variable to be compared is the value of the cookie whose
name is specified by this attribute.</p>
]]>
</description>
</attribute>
<attribute>
<name>header</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description>
<![CDATA[
<p>The variable to be compared is the value of the header whose
name is specified by this attribute. The name match is performed
in a case insensitive manner.</p>
]]>
</description>
</attribute>
<attribute>
<name>name</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description>
<![CDATA[
<p>The variable to be compared is the JSP bean specified by this
attribute, if <code>property</code> is not specified, or the value
of the specified property of this bean, if <code>property</code>
is specified.</p>
]]>
</description>
</attribute>
<attribute>
<name>parameter</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description>
<![CDATA[
<p>The variable to be compared is the first, or only, value of the
request parameter specified by this attribute.</p>
]]>
</description>
</attribute>
<attribute>
<name>property</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description>
<![CDATA[
<p>The variable to be compared is the property (of the bean specified
by the <code>name</code> attribute) specified by this attribute.
The property reference can be simple, nested, or indexed.</p>
]]>
</description>
</attribute>
<attribute>
<name>scope</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description>
<![CDATA[
<p>The bean scope within which to search for the bean named by the
<code>name</code> property, or "any scope" if not specified.</p>
]]>
</description>
</attribute>
<attribute>
<name>value</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
<description>
<![CDATA[
<p>The constant value to which the variable, specified by other
attribute(s) of this tag, will be compared.</p>
]]>
</description>
</attribute>
</tag>
<tag>
<name>iterate</name>
<tag-class>org.apache.struts.taglib.logic.IterateTag</tag-class>
<tei-class>org.apache.struts.taglib.logic.IterateTei</tei-class>
<body-content>JSP</body-content>
<description>
<![CDATA[
<p><strong>
Repeat the nested body content of this tag over a specified collection.
</strong></p>
<p>Repeats the nested body content of this tag once for every element
of the specified collection, which must be an <code>Iterator</code>,
a <code>Collection</code>, a <code>Map</code> (whose values are to be
iterated over), or an array. The collection to be iterated over must be
specified in one of the following ways:</p>
<ul>
<li>As a runtime expression specified as the value of the
<code>collection</code> attribute.</li>
<li>As a JSP bean specified by the <code>name</code> attribute.</li>
<li>As the property, specified by the <code>property</code>, of the
JSP bean specified by the <code>name</code> attribute.</li>
</ul>
<p>The collection to be iterated over MUST conform to one of the following
requirements in order for iteration to be successful:</p>
<ul>
<li>An array of Java objects or primitives.</li>
<li>An implementation of <code>java.util.Collection</code>, including
<code>ArrayList</code> and <code>Vector</code>.</li>
<li>An implementation of <code>java.util.Enumeration</code>.</li>
<li>An implementation of <code>java.util.Iterator</code>.</li>
<li>An implementation of <code>java.util.Map</code>, including
<code>HashMap</code>, <code>Hashtable</code>, and
<code>TreeMap</code>. <strong>NOTE</strong> - See below for
additional information about accessing Maps.</li>
</ul>
<p>Normally, each object exposed by the iterate tag is an element
of the underlying collection you are iterating over. However, if you
iterate over a <code>Map</code>, the exposed object is of type
<code>Map.Entry</code> that has two properties:</p>
<ul>
<li><code>key</code> - The key under which this item is stored in the
underlying Map.</li>
<li><code>value</code> - The value that corresponds to this key.</li>
</ul>
<p>So, if you wish to iterate over the values of a Hashtable, you would
implement code like the following:</p>
<code>
<logic:iterate id="element" name="myhashtable"><br/>
Next element is <bean:write name="element" property="value"/><br/>
</logic:iterate>
</code>
<p>If the collection you are iterating over can contain <code>null</code>
values, the loop will still be performed but no page scope attribute
(named by the <code>id</code> attribute) will be created for that loop
iteration. You can use the <code><logic:present></code> and
<code><logic:notPresent></code> tags to test for this case.</p>
]]>
</description>
<attribute>
<name>collection</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<type>java.lang.Object</type>
<description>
<![CDATA[
<p>A runtime expression that evaluates to a collection (conforming to
the requirements listed above) to be iterated over.</p>
]]>
</description>
</attribute>
<attribute>
<name>id</name>
<required>true</required>
<rtexprvalue>false</rtexprvalue>
<description>
<![CDATA[
<p>The name of a page scope JSP bean that will contain the current
element of the collection on each iteration, if it is not
<code>null</code>.</p>
]]>
</description>
</attribute>
<attribute>
<name>indexId</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description>
<![CDATA[
<p>The name of a page scope JSP bean that will contain the current
index of the collection on each iteration.</p>
]]>
</description>
</attribute>
<attribute>
<name>length</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description>
<![CDATA[
<p>The maximum number of entries (from the underlying collection) to be
iterated through on this page. This can be either an integer that
directly expresses the desired value, or the name of a JSP bean (in
any scope) of type <code>java.lang.Integer</code> that defines the
desired value. If not present, there will be no limit on the number
of iterations performed.</p>
]]>
</description>
</attribute>
<attribute>
<name>name</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description>
<![CDATA[
<p>The name of the JSP bean containing the collection to be iterated
(if <code>property</code> is not specified), or the JSP bean whose
property getter returns the collection to be iterated (if
<code>property</code> is specified).</p>
]]>
</description>
</attribute>
<attribute>
<name>offset</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description>
<![CDATA[
<p>The zero-relative index of the starting point at which entries from
the underlying collection will be iterated through. This can be either
an integer that directly expresses the desired value, or the name of a
JSP bean (in any scope) of type <code>java.lang.Integer</code> that
defines the desired value. If not present, zero is assumed (meaning
that the collection will be iterated from the beginning.</p>
]]>
</description>
</attribute>
<attribute>
<name>property</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description>
<![CDATA[
<p>Name of the property, of the JSP bean specified by <code>name</code>,
whose getter returns the collection to be iterated.</p>
]]>
</description>
</attribute>
<attribute>
<name>scope</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description>
<![CDATA[
<p>The bean scope within which to search for the bean named by the
<code>name</code> property, or "any scope" if not specified.</p>
]]>
</description>
</attribute>
<attribute>
<name>type</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description>
<![CDATA[
<p>Fully qualified Java class name of the element to be exposed through
the JSP bean named from the <code>id</code> attribute. If not present,
no type conversions will be performed. NOTE: The actual elements of
the collection must be assignment-compatible with this class, or a
request time ClassCastException will occur.</p>
]]>
</description>
</attribute>
</tag>
<tag>
<name>lessEqual</name>
<tag-class>org.apache.struts.taglib.logic.LessEqualTag</tag-class>
<body-content>JSP</body-content>
<description>
<![CDATA[
<p><strong>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -