Hi,
I have another Problem connected to the iterator problem :-)
I have some java variables in my jsp side which do some counting for
navigation purposes.
I need these to decide if I want to render a tableheader (in case of the
first element of the collection) or not.
We can't put all entries in one table, because we fold some entries, so a
single entry has to be hidden if necessary.
I tried <s:if test="accountCount == 1"> and <s:if test="#accountCount ==
1"> but both did not work.
Can I use scriptlet variables in s:if or is there another way to realize
this?
Thanks in advance and best regards,
Marc
______________________________
<%
int personCount = 1;
int accountCount = 0;
int attorneyCount = 0;
int top=43;
%>
<s:iterator value="accountSearchResults.accounts" status="rowstatus"
id="account">
<s:if test="#rowstatus.odd == true">
<% trclass = "odd"; %>
</s:if>
<s:else>
<% trclass = "even"; %>
</s:else>
<%
count++;
accountCount++;
info =
showHeader+"|"+personCount+"|"+accountCount+"|"+attorneyCount+"|v";
top += 22;
%>
<div id="accountRowId_<%= count %>" class="tablecontainer"
style="width:920px;margin-bottom:0px;position:absolute;visibility:visible;left:64px;top:<%=
top %>px;">
<input type="hidden" id="accountRowInfo_<%= count %>"
value="n|1|2|0|v" />
<table cellpadding="0" cellspacing="0" style="width:920px;">
<thead>
<s:if test="accountCount == 1">
<tr>
<th align="left"
style="color:#444;width:130px;">Konto</th>
<th align="left" style="border-left:1px
solid #fff;width:150px;">BLZ</th>
<th align="left" style="border-left:1px
solid #fff;width:250px;">Konto Nr</th>
<th align="left" style="border-left:1px
solid #fff;width:200px;">Konto Typ</th>
</tr>
</s:if>
</thead>
<tfoot></tfoot>
<tbody>
<tr class="even" id="row5" onclick="setRowColor(5)">
<td style="width:130px;">
<input type="radio" name="client"
id="customer5" style="padding:0px;margin-left:17px;" />
</td>
<td style="width:150px;border-left:1px solid
#8CDB5A;"><s:property value="#account.bankCodeNumber"/></td>
<td style="width:250px;border-left:1px solid
#8CDB5A;"><s:property value="#account.accountNumber"/></td>
<td style="width:200px;border-left:1px solid
#8CDB5A;"><s:property value="#account.accountType"/></td>
</tr>
</tbody>
</table>
</div>
</s:iterator>