title: Calculate module of index int Struts2 iterator
body: <p>I'm using Struts2 iterator to setup a list of checkbox in a table. I want to have 10 checkbox per row, so I'm doing the following:</p>
  
  <pre><code>&lt;table&gt;
      &lt;tr&gt;
      &lt;s:iterator value="securityMasterFields" status="fieldNameStatus" var="fieldName"&gt;
          &lt;s:if test="#fieldNameStatus.index % 10 ==0"&gt;
                  &lt;/tr&gt;&lt;tr&gt;
          &lt;/s:if&gt;
          &lt;td&gt;
              &lt;s:checkbox name="fieldsToShow" fieldValue="%{fieldName}" value="%{fieldName}"/&gt;
          &lt;/td&gt;
      &lt;/s:iterator&gt;       
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>It never goes through the if, so I'm assuming the mod is not been calculated correctly. How do I do it?</p>
  
  <p>thanks</p>