struts2标签分行分列显示数据

下面代码是从action返回appList,并控制在页面上每行显示3个数据
<table class="hot_style" border="0" cellspacing="0" cellpadding="0">
  <tr>
     <s:iterator id="item" value="appList" status="st">
<td width="33%">
           <img src="showImage?itemId=<s:property value='#item.goid'/>"      onclick="showAppInfo(<s:property value='#item.goid'/>)">
           <p><s:property value="#item.name"/></p>
        </td>
<s:if test="#st.modulus(3)==0">
<s:if test="#st.last">
    </tr>
</s:if>
                <s:else>
    </tr><tr>
</s:else>
</s:if>
     </s:iterator>
</table>

你可能感兴趣的:(struts2标签)