Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As <strong>Jagan</strong> said, assume that <code>map</code> is <code>java.util.List</code></p> <pre><code>&lt;s:iterator value="map" status="stat"&gt; &lt;s:textarea value="%{top}" /&gt; &lt;/s:iterator&gt; </code></pre> <p><strong>or</strong></p> <pre><code>&lt;s:iterator value="map" status="stat"&gt; &lt;s:textarea&gt; &lt;s:param name="value"&gt; &lt;s:property/&gt; &lt;/s:param&gt; &lt;/s:textarea&gt; &lt;/s:iterator&gt; </code></pre> <p><strong>or</strong></p> <pre><code>&lt;s:iterator value="map" status="stat"&gt; &lt;s:textarea&gt; &lt;s:param name="value"&gt; ${top} &lt;/s:param&gt; &lt;/s:textarea&gt; &lt;/s:iterator&gt; </code></pre> <hr> <blockquote> <p><strong>@Jagan</strong> : if it is map how to do this ?</p> </blockquote> <p>Assume map is <code>java.util.Map</code></p> <pre><code>&lt;s:iterator value="map" status="stat"&gt; &lt;s:textarea value="%{key}" /&gt; &lt;!-- or --&gt; &lt;s:textarea value="%{value}" /&gt; &lt;/s:iterator&gt; </code></pre> <hr> <p><strong><a href="http://struts.apache.org/2.2.3/struts2-core/apidocs/org/apache/struts2/components/IteratorComponent.html" rel="nofollow">IteratorComponent</a></strong></p> <pre><code>if (value == null &amp;&amp; begin == null &amp;&amp; end == null) { value = "top"; } </code></pre> <p><code>top</code> is not a attribute of <code>iterator</code> and not a keyword of <code>OGNL</code>. (I may be wrong)</p> <p><strong>top</strong> : top of Stack / element of the current iteration</p> <p>e.g.</p> <pre><code>&lt;s:property value="top" /&gt; </code></pre> <p>or</p> <pre><code>&lt;s:property value="[0].top" /&gt; </code></pre> <hr> <p><strong><a href="http://struts.apache.org/2.1.8.1/docs/iterator-tag-examples.html" rel="nofollow">Iterator tag examples</a></strong> of Struts2 <strong><a href="http://struts.apache.org/2.1.8.1/docs/cookbook.html" rel="nofollow">Cookbook</a></strong> have better explanation</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload