You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Michael McGrady <mi...@michaelmcgrady.com> on 2004/07/13 23:52:56 UTC

How Flexible are Struts and El Tags?

Using the standard JSP tags, we can pretty do much do anything on a page, e.g.:

<%
List list = new TreeList();
list.add("first");
list.add("second");

Iterator iter1 = list.iterator();

while(iter2.hasNext()) {
         List list = someMapA.get(iter.next());
         lIterator iter2 = list.iterator();
         while(iter2.hasNext()) { %>
                 <%= "<someTag value=" + iter2.next() %>
     <% }
         list = someMapB.get(iter.next());
         iter2 = list.iterator();
         while(iter2.hasNext()) { %>
                 <%= "<someTag value=" + iter2.next() %>
     <% }
}
%>

Can you do this with el or struts tags, assuming that the needed objects 
are in scope?  I don't mean to ask whether you can write a tag to do 
this.  I know we can. I mean to ask whether the existent tags allow this 
flexibility.

Thanks!

Michael