i am trying to display 4 values in a single tr and next four values in next tr. But with my below code all the values are showing in a single tr with long horizontal scroll.
I want to show my list values : 4 values in each row and next 4 values in next tr
Please check my code and tell me the logic to solve my problem..
<s:if test="themes.size() > 0">
<table>
<s:iterator value="themes" status="userStatus">
<tr>
<td height="90%">
<s:property value="themeName" />
</td>
</tr>
</s:iterator>
</table>
What i tried is the below code:
`<s:if test="themes.size() > 0">
<table>
<s:set var="index" value="%{0}" />
<tr>
<s:iterator value="themes" status="userStatus">
<td height="90%">
<s:property value="themeName" />
</td>
<s:set var="newindex" value="%{1 + #attr.index}" />
<s:if test="#attr.newindex %4==0">
</tr><tr>
</s:if>
</s:iterator>
</tr>
</table>
</s:if>
Use module: