cedric 2003/03/21 16:27:06 Modified: web/tiles-documentation/layouts vboxLayout.jsp Log: Add commented examples using <logic:iterate> and <c:forEach>. These examples work on appropriate container only (>1.2) Revision Changes Path 1.2 +26 -1 jakarta-struts/web/tiles-documentation/layouts/vboxLayout.jsp Index: vboxLayout.jsp =================================================================== RCS file: /home/cvs/jakarta-struts/web/tiles-documentation/layouts/vboxLayout.jsp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- vboxLayout.jsp 6 Jul 2002 01:13:51 -0000 1.1 +++ vboxLayout.jsp 22 Mar 2003 00:27:06 -0000 1.2 @@ -4,7 +4,9 @@ <%-- Layout component Render a list of tiles in a vertical column @param : list List of names to insert - + This file contains 3 possible implementations. + Use only one and comment the others. Don't forget to move the appropriate taglib + declaration in the header. --%> <tiles:useAttribute id="list" name="list" classname="java.util.List" /> @@ -25,3 +27,26 @@ } // end loop %> + +<%-- Iterate over names. + Use jstl <forEach> tag. + Require the jstl taglib. + --%> +<%-- +<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %> +<c:forEach var="name" items="${list}"> + <tiles:insert beanName="name" flush="true" /> +<br> +</c:forEach> + --%> + +<%-- Iterate over names. + Use struts <iterate> tag. Work on jsp1.2 and greater web container. + --%> +<%-- +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> +<logic:iterate id="name" name="list" type="java.lang.String"> + <tiles:insert beanName="name" flush="false" /> +<br> +</logic:iterate> + --%>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]