Hi, i've a questione regarding sum calculation in a table:
The jsp look like this one:

        <logic:present name="lista">
                <div class="lista"><c:set var="recCount" value="${0}" />
                <table class="scrollable" id="lista"
                        <thead>
                                <tr>
                                        <th id="hNr" colspan="2">Nr</th>
                                        
                                </tr>
                        </thead>
                        <tfoot>
                                <tr>
                                        <td><c:out
value="${recCount}"></c:out></td>
                                </tr>
                        </tfoot>
                        <tbody>
                                <logic:iterate id="index" name="lista">
                                        <c:set var="recCount"
value="${recCount+1}" />
                                        <tr>
                                                <td headers="hNr"
class="Numeric"><bean:write
                                                        name="index"
property="number" /></td>
                                        </tr>
                                </logic:iterate>
                        </tbody>
                </table>
                </div>
        </logic:present>
</html:form>

Obviously the recCount outputted is 0. To output the right value i have
to put the tfoot after the tbody section but this is not allowed by the
DTD. I would not pre-calculate the rowCount due performance problem.
Does anybody have some ideas to solve this problem ?
Thanks in advance
Ciao, Marcello

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to