You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by ws...@apache.org on 2006/05/29 17:47:51 UTC

svn commit: r410111 - /struts/action/trunk/apps/examples/src/main/webapp/exercise/logic-iterate.jsp

Author: wsmoak
Date: Mon May 29 08:47:51 2006
New Revision: 410111

URL: http://svn.apache.org/viewvc?rev=410111&view=rev
Log:
Added an example of <logic:iterate> using a JSP expression for the 'collection' attribute.

Modified:
    struts/action/trunk/apps/examples/src/main/webapp/exercise/logic-iterate.jsp

Modified: struts/action/trunk/apps/examples/src/main/webapp/exercise/logic-iterate.jsp
URL: http://svn.apache.org/viewvc/struts/action/trunk/apps/examples/src/main/webapp/exercise/logic-iterate.jsp?rev=410111&r1=410110&r2=410111&view=diff
==============================================================================
--- struts/action/trunk/apps/examples/src/main/webapp/exercise/logic-iterate.jsp (original)
+++ struts/action/trunk/apps/examples/src/main/webapp/exercise/logic-iterate.jsp Mon May 29 08:47:51 2006
@@ -125,5 +125,15 @@
         <bean:write name="index" />]</li>
       </logic:iterate>
     </ol>
+    <h3>Test 11 - Iterate over a List using the 'collection' attribute</h3>
+    <ol>
+      <logic:iterate id="item" collection="<%= list %>" indexId="index">
+        <li>
+        <em>
+          <bean:write name="item" />
+        </em>&#160;[
+        <bean:write name="index" />]</li>
+      </logic:iterate>
+    </ol>
   </body>
 </html>