I am using 1.1b1
Summary: I cannot make use of the indexId reference in side a java method, unless I
specify an id="XX" attribute.
The funny thing is that the id attribute can be named anything.
I have been coding my list in this manner for some time without problems.
I am using the logic:iterate with the indexid="counter" passed into a java function
that swaps the row style.
The toggleRow method assumes that the counter reference is an Integer object.
<logic:iterate name="customerHistoryForm"
property="pageList"
id="item"
type="com.nlg.ar.common.datatransfer.vo.CustomerHistoryVO"
indexId="counter" >
<tr class="<%= WebFormatter.toggleRow(counter) %>">
<td><bean:write name="item" property="userName"/></td>
</tr>
</logic:iterate>
I would like to use the nested library and near as I can I should be able to use this:
<nested:iterate property="pageList" indexId="counter">
<tr class="<%= WebFormatter.toggleRow(counter) %>">
<td ><nested:write property="userName"/></td>
</tr>
</nested:iterate>
This will result in a compile error: Undefined variable: counter
I get the code to work by adding an id attribute with any value in it.
<nested:iterate property="pageList" indexId="counter" id="XYZ" >
<tr class="<%= WebFormatter.toggleRow(counter) %>">
<td ><nested:write property="userName"/></td>
</tr>
</nested:iterate>
This code works as the above code I started with.
Is this a bug in 1.1b1 that has been fixed in 1.1b2 ?
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>