struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JOSE L MARTINEZ-AVIAL <jlm...@gmail.com>
Subject Calculate module of index in Struts2 iterator
Date Tue, 14 Dec 2010 16:26:57 GMT
Hello, I'm using Struts2 iterator to setup a list of checkbox in a
table(about 150 checkboxes). I want to have 10 checkbox per row, so I'm
doing the following:

<table>
    <tr>
    <s:iterator value="securityMasterFields" status="fieldNameStatus"
var="fieldName">
        <s:if test="#fieldNameStatus.index % 10 ==0">
                </tr><tr>
        </s:if>
        <td>
            <s:checkbox name="fieldsToShow" fieldValue="%{fieldName}"
value="%{fieldName}"/>
        </td>
    </s:iterator>
    </tr>
</table>

It never goes through the if, so I'm assuming the module is not been
calculated correctly. How do I do it?

thanks

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message