クラスファイルにデータベースからのDBクエリがあります:
List srActionList = hibernate_session.createQuery("from SrActionModal where srReportShow = 'Y' order by actDesc").list();
ArrayList dataResultList = new ArrayList();
SrActionModal status = new SrActionModal();
for (int i = 0; i < srActionList.size(); i++) {
status = (SrActionModal) srActionList.get(i);
status.setActDesc(status.getActDesc());
dataResultList.add(status);
}
session.setAttribute("srActionList", dataResultList);
そして、srActionList属性をテーブルに表示したいと思います。現在、私の出力は以下のようです。
<logic:iterate id="list" name="srActionList">
<html:multibox property="selectedAction">
<bean:write name="list" property='code'/>
</html:multibox>
<bean:write name="list" property='actDesc'/>
</logic:iterate>
私の質問は、より良い配置のために結果をテーブルに配置する方法ですか? 1 行あたりの制限列は 2 です。resultsize が 10 の場合、1 行あたり 2 列を含む 5 行になります。
<table>
<tr>
<td>list 1</td> <td>list 2</td>
</tr>
<tr>
<td>list 3</td> <td>list 4</td>
</tr>
</table>