--- Ryan <[EMAIL PROTECTED]> wrote: > <table> > <s:iterator value="listoflists" status="rowstatus"> > <tr> > <s:iterator value="top" status="stat"> > <s:if test="#stat.index==0"> > <td class="1"> > <s:property value="%{listoflists[#rowstatus.index][0]}"/> > </td> > </s:if> > <s:if test="#stat.index==1"> > <td class="2"> > <s:property value="%{listoflists[#rowstatus.index][1]}"/> > </td> > </s:if> > </s:iterator> > </tr> > </s:iterator> > </table> > > Problem is the listoflists property is accessed each > time an element is accessed (in this case 2 X the > number of elements in the lists).
I'm not sure what you mean by that--it's accessed twice because you're getting two different values out of the collection in each "listoflists" element. Are you mad because you believe "listoflists[#rowstatus.index][n]" is significantly more expensive than "anElement[n]"? Use <s:iterator.../>'s "id" attribute to name each element of the iteration; you could also use <s:set.../>. If your class names are really "1" and "2" then you might as well use an expression there so you don't need those <s:if.../> tags in the inner iteration. (Even if they're not, you could still do something to eliminate them; they're somewhat obfuscating IMO.) d. ____________________________________________________________________________________ Shape Yahoo! in your own image. Join our Network Research Panel today! http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]