Ryan wrote:
Hello All,I'm trying to create a table that has different classes for each column by iterating across a list of lists..... <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). This is obviously computationally expensive for a simple table. Is there a better way to access this list of lists??
I'm not an S2 user but cant you store a reference to the listoflists[#rowstatus.index] list item say, in the page context, before the TDs? Also, i dont know how the %{} stuff works but maybe it would be faster if you provided a scope (i.e. not sure the order in which scopes are checked for listoflists).
Cheers, Manos --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

